From 07483af828b18d999ca76df09878b703314fe093 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 19 Oct 2024 12:56:23 +0100 Subject: [PATCH] Updated examples --- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts} | 2 +- .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts} | 2 +- .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts} | 2 +- .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- ...Result.d.ts => IGenerateWeaponResult.d.ts} | 2 +- .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../src/fluentTraderAssortCreator.ts | 8 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../13AddTrader/types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../13AddTrader/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../16ImporterUtil/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../1LogToConsole/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../20CustomChatBot/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../24WebSocket/types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../24WebSocket/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../2EditDatabase/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../5ReplaceMethod/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../7OnLoadHook/types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../7OnLoadHook/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../8OnUpdateHook/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- .../types/callbacks/DialogueCallbacks.d.ts | 6 +- .../types/callbacks/LocationCallbacks.d.ts | 3 +- .../types/callbacks/TraderCallbacks.d.ts | 4 +- .../types/callbacks/WeatherCallbacks.d.ts | 1 + .../types/context/ContextVariableType.d.ts | 4 +- .../types/controllers/BotController.d.ts | 10 +- .../types/controllers/DialogueController.d.ts | 18 ++-- .../types/controllers/HideoutController.d.ts | 22 +++-- .../controllers/InsuranceController.d.ts | 20 ++-- .../types/controllers/LauncherController.d.ts | 4 +- .../types/controllers/LocationController.d.ts | 3 +- .../types/controllers/MatchController.d.ts | 4 +- .../types/controllers/RagfairController.d.ts | 11 ++- .../types/controllers/WeatherController.d.ts | 9 +- .../generators/BotEquipmentModGenerator.d.ts | 19 ++-- .../types/generators/BotGenerator.d.ts | 8 +- .../generators/BotInventoryGenerator.d.ts | 21 ++++- .../types/generators/BotLevelGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 10 +- .../types/generators/LootGenerator.d.ts | 32 +++++-- .../types/generators/PlayerScavGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 19 ++-- .../RepeatableQuestRewardGenerator.d.ts | 22 +++-- .../generators/ScavCaseRewardGenerator.d.ts | 8 +- .../types/generators/WeatherGenerator.d.ts | 25 +++-- .../9RouterHooks/types/helpers/BotHelper.d.ts | 12 ++- .../types/helpers/DialogueHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 4 +- .../types/helpers/HideoutHelper.d.ts | 22 ++++- .../types/helpers/InRaidHelper.d.ts | 2 +- .../types/helpers/InventoryHelper.d.ts | 4 +- .../types/helpers/NotificationSendHelper.d.ts | 4 +- .../types/helpers/NotifierHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 17 +--- .../types/helpers/RagfairOfferHelper.d.ts | 4 +- .../types/helpers/RepairHelper.d.ts | 4 +- .../types/helpers/WeatherHelper.d.ts | 25 +++++ .../types/loaders/PreSptModLoader.d.ts | 4 +- .../models/eft/common/tables/IBotBase.d.ts | 6 +- .../eft/common/tables/ICustomizationItem.d.ts | 4 +- .../eft/common/tables/IProfileTemplate.d.ts | 4 +- .../models/eft/common/tables/IQuest.d.ts | 36 ++++---- .../eft/common/tables/ITemplateItem.d.ts | 8 +- .../dialog/IGetAllAttachmentsResponse.d.ts | 4 +- .../IGetMailDialogViewResponseData.d.ts | 4 +- .../eft/game/IVersionValidateRequestData.d.ts | 4 +- .../types/models/eft/health/IWorkoutData.d.ts | 36 +++++++- .../HideoutUpgradeCompleteRequestData.d.ts | 5 - .../models/eft/hideout/IHideoutArea.d.ts | 8 +- .../IHideoutImproveAreaRequestData.d.ts | 4 +- .../eft/hideout/IHideoutProduction.d.ts | 6 +- .../models/eft/hideout/IHideoutScavCase.d.ts | 8 +- .../IHideoutScavCaseStartRequestData.d.ts | 8 +- .../hideout/IHideoutUpgradeRequestData.d.ts | 4 +- .../inventory/IInventoryAddRequestData.d.ts | 4 +- .../IInventoryBaseActionRequestData.d.ts | 8 +- .../IInventoryCreateMarkerRequestData.d.ts | 4 +- .../IInventoryEditMarkerRequestData.d.ts | 4 +- .../inventory/IInventoryMoveRequestData.d.ts | 4 +- .../inventory/IInventorySplitRequestData.d.ts | 4 +- .../inventory/IInventorySwapRequestData.d.ts | 6 +- .../IOpenRandomLootContainerRequestData.d.ts | 4 +- .../eft/itemEvent/IItemEventRouterBase.d.ts | 4 +- .../itemEvent/IItemEventRouterRequest.d.ts | 12 +-- .../models/eft/launcher/IMiniProfile.d.ts | 4 +- .../eft/location/IAirdropLootResult.d.ts | 4 +- .../eft/location/IGetAirdropLootRequest.d.ts | 3 + .../eft/match/IEndLocalRaidRequestData.d.ts | 1 + .../types/models/eft/match/IRaidSettings.d.ts | 12 +-- .../eft/match/IStartLocalRaidRequestData.d.ts | 2 + .../types/models/eft/profile/ISptProfile.d.ts | 92 +++++++++---------- .../eft/ragfair/IAddOfferRequestData.d.ts | 4 +- .../models/eft/ragfair/IRagfairOffer.d.ts | 5 +- .../eft/repair/IRepairActionDataRequest.d.ts | 4 +- .../ITraderRepairActionDataRequest.d.ts | 4 +- .../models/eft/weather/IWeatherData.d.ts | 3 + .../models/eft/ws/IWsChatMessageReceived.d.ts | 4 +- .../types/models/enums/AirdropType.d.ts | 9 +- .../models/enums/WildSpawnTypeNumber.d.ts | 4 +- .../models/enums/hideout/QteEffectType.d.ts | 6 +- .../models/spt/bots/BotGenerationDetails.d.ts | 2 +- .../models/spt/bots/GenerateWeaponResult.d.ts | 10 -- .../bots/IGenerateEquipmentProperties.d.ts | 12 +-- .../spt/bots/IGenerateWeaponResult.d.ts | 10 ++ .../models/spt/bots/IModToSpawnRequest.d.ts | 4 +- .../spt/callbacks/IDialogueCallbacks.d.ts | 4 +- .../models/spt/config/IAirdropConfig.d.ts | 8 +- .../types/models/spt/config/IBotConfig.d.ts | 33 ++++--- .../models/spt/config/IBotDurability.d.ts | 4 +- .../models/spt/config/IHealthConfig.d.ts | 8 +- .../models/spt/config/IHideoutConfig.d.ts | 8 +- .../models/spt/config/IInRaidConfig.d.ts | 10 +- .../models/spt/config/IInventoryConfig.d.ts | 4 +- .../models/spt/config/IPlayerScavConfig.d.ts | 8 +- .../types/models/spt/config/IPmcConfig.d.ts | 14 +-- .../models/spt/config/IRagfairConfig.d.ts | 21 +++-- .../models/spt/config/IRepairConfig.d.ts | 16 ++-- .../models/spt/config/ITraderConfig.d.ts | 22 ++--- .../models/spt/config/IWeatherConfig.d.ts | 14 ++- .../spt/dialog/ISendMessageDetails.d.ts | 4 +- .../ScavCaseRewardCountsAndPrices.d.ts | 10 +- .../types/models/spt/mod/NewItemDetails.d.ts | 4 +- .../models/spt/ragfair/ITplWithFleaPrice.d.ts | 5 + .../models/spt/server/ISettingsBase.d.ts | 16 ++-- .../models/spt/services/CustomPreset.d.ts | 5 - .../spt/services/CustomTraderAssortData.d.ts | 6 -- .../models/spt/services/ILootRequest.d.ts | 33 +++++++ .../types/models/spt/services/LootItem.d.ts | 2 +- .../models/spt/services/LootRequest.d.ts | 15 --- .../types/models/spt/utils/ILogger.d.ts | 4 +- .../types/routers/EventOutputHolder.d.ts | 4 +- .../types/servers/http/SptHttpListener.d.ts | 16 +++- .../types/services/AirdropService.d.ts | 15 +-- .../services/BotEquipmentFilterService.d.ts | 18 ++-- .../types/services/BotLootCacheService.d.ts | 10 +- .../types/services/BotNameService.d.ts | 12 ++- .../services/CircleOfCultistService.d.ts | 12 +-- .../types/services/InMemoryCacheService.d.ts | 29 ++++++ .../services/LocationLifecycleService.d.ts | 26 +++++- .../types/services/MailSendService.d.ts | 14 +-- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 30 ------ .../services/RagfairLinkedItemService.d.ts | 4 +- .../types/services/RaidWeatherService.d.ts | 43 +++++++++ .../types/services/RepairService.d.ts | 12 +-- .../types/services/SeasonalEventService.d.ts | 16 ++++ .../TraderPurchasePersisterService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 4 +- .../9RouterHooks/types/utils/TimeUtil.d.ts | 12 +++ .../utils/logging/AbstractWinstonLogger.d.ts | 4 +- 3637 files changed, 23068 insertions(+), 15452 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/location/IGetAirdropLootRequest.d.ts rename TypeScript/{12ClassExtensionOverride/types/models/spt/bots/GenerateWeaponResult.d.ts => 10ScopesAndTypes/types/models/spt/bots/IGenerateWeaponResult.d.ts} (88%) create mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/location/IGetAirdropLootRequest.d.ts rename TypeScript/{10ScopesAndTypes/types/models/spt/bots/GenerateWeaponResult.d.ts => 11BundleLoadingSample/types/models/spt/bots/IGenerateWeaponResult.d.ts} (88%) create mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/location/IGetAirdropLootRequest.d.ts rename TypeScript/{11BundleLoadingSample/types/models/spt/bots/GenerateWeaponResult.d.ts => 12ClassExtensionOverride/types/models/spt/bots/IGenerateWeaponResult.d.ts} (88%) create mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IGetAirdropLootRequest.d.ts rename TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/{GenerateWeaponResult.d.ts => IGenerateWeaponResult.d.ts} (88%) create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/13AddTrader/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/13AddTrader/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/13AddTrader/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/16ImporterUtil/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/18CustomItemService/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/1LogToConsole/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/20CustomChatBot/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/24WebSocket/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/24WebSocket/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/24WebSocket/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/24WebSocket/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/24WebSocket/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/24WebSocket/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/24WebSocket/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/2EditDatabase/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/7OnLoadHook/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/services/RaidWeatherService.d.ts create mode 100644 TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/location/IGetAirdropLootRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/spt/bots/GenerateWeaponResult.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/spt/bots/IGenerateWeaponResult.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/spt/ragfair/ITplWithFleaPrice.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/spt/services/CustomTraderAssortData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/spt/services/ILootRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/services/InMemoryCacheService.d.ts delete mode 100644 TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts create mode 100644 TypeScript/9RouterHooks/types/services/RaidWeatherService.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts b/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/loaders/PreSptModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/AirdropType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/AirdropType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateWeaponResult.d.ts similarity index 88% rename from TypeScript/12ClassExtensionOverride/types/models/spt/bots/GenerateWeaponResult.d.ts rename to TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateWeaponResult.d.ts index 73209ac..8e1e318 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/GenerateWeaponResult.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -1,7 +1,7 @@ import { IMods } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { +export interface IGenerateWeaponResult { weapon: IItem[]; chosenAmmoTpl: string; chosenUbglAmmoTpl: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotDurability.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/ILootRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/LootItem.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/utils/ILogger.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts b/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/10ScopesAndTypes/types/services/AirdropService.d.ts b/TypeScript/10ScopesAndTypes/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/10ScopesAndTypes/types/services/AirdropService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/10ScopesAndTypes/types/services/CircleOfCultistService.d.ts b/TypeScript/10ScopesAndTypes/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/10ScopesAndTypes/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/10ScopesAndTypes/types/services/InMemoryCacheService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts b/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts b/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/10ScopesAndTypes/types/services/RaidWeatherService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts b/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/10ScopesAndTypes/types/utils/TimeUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/TimeUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/10ScopesAndTypes/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts b/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/loaders/PreSptModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/AirdropType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/AirdropType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateWeaponResult.d.ts similarity index 88% rename from TypeScript/10ScopesAndTypes/types/models/spt/bots/GenerateWeaponResult.d.ts rename to TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateWeaponResult.d.ts index 73209ac..8e1e318 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/bots/GenerateWeaponResult.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -1,7 +1,7 @@ import { IMods } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { +export interface IGenerateWeaponResult { weapon: IItem[]; chosenAmmoTpl: string; chosenUbglAmmoTpl: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotDurability.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/ILootRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/LootItem.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/utils/ILogger.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts b/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/11BundleLoadingSample/types/services/AirdropService.d.ts b/TypeScript/11BundleLoadingSample/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/11BundleLoadingSample/types/services/AirdropService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/11BundleLoadingSample/types/services/CircleOfCultistService.d.ts b/TypeScript/11BundleLoadingSample/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/11BundleLoadingSample/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/11BundleLoadingSample/types/services/InMemoryCacheService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts b/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts b/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/11BundleLoadingSample/types/services/RaidWeatherService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts b/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/11BundleLoadingSample/types/utils/TimeUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/TimeUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/11BundleLoadingSample/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts b/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/PreSptModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/AirdropType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/AirdropType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateWeaponResult.d.ts similarity index 88% rename from TypeScript/11BundleLoadingSample/types/models/spt/bots/GenerateWeaponResult.d.ts rename to TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateWeaponResult.d.ts index 73209ac..8e1e318 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/bots/GenerateWeaponResult.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -1,7 +1,7 @@ import { IMods } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { +export interface IGenerateWeaponResult { weapon: IItem[]; chosenAmmoTpl: string; chosenUbglAmmoTpl: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotDurability.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/ILootRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootItem.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/utils/ILogger.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/12ClassExtensionOverride/types/services/AirdropService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/AirdropService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/12ClassExtensionOverride/types/services/CircleOfCultistService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/InMemoryCacheService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/12ClassExtensionOverride/types/services/RaidWeatherService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/12ClassExtensionOverride/types/utils/TimeUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/TimeUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/LocationCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/TraderCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/BotController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/BotController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/DialogueController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/DialogueController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HideoutController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HideoutController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LauncherController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LauncherController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LocationController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LocationController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/MatchController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/MatchController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/RagfairController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/RagfairController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotInventoryGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotWeaponGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LootGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LootGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/PlayerScavGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/BotHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/BotHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/DialogueHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HealthHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HealthHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HideoutHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InventoryHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotificationSendHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotifierHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ProfileHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RepairHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RepairHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/loaders/PreSptModLoader.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 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 @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/AirdropType.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/AirdropType.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateWeaponResult.d.ts similarity index 88% rename from TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/GenerateWeaponResult.d.ts rename to TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateWeaponResult.d.ts index 73209ac..8e1e318 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/GenerateWeaponResult.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -1,7 +1,7 @@ import { IMods } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { +export interface IGenerateWeaponResult { weapon: IItem[]; chosenAmmoTpl: string; chosenUbglAmmoTpl: string; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotDurability.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: 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 3a2de2a..af0ec79 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } 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 8fd2e5f..2e68219 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } 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 a62f2c9..9b17861 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomPreset.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/ILootRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootItem.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootRequest.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/utils/ILogger.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/EventOutputHolder.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/AirdropService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/AirdropService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotEquipmentFilterService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotLootCacheService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotLootCacheService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/CircleOfCultistService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/InMemoryCacheService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/MailSendService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/MailSendService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileSnapshotService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/RagfairLinkedItemService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/RaidWeatherService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/RepairService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/RepairService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/mod/CustomItemService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/TimeUtil.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/TimeUtil.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts b/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts index 1b8283b..0da16d1 100644 --- a/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts +++ b/TypeScript/13AddTrader/src/fluentTraderAssortCreator.ts @@ -1,4 +1,4 @@ -import { Item } from "@spt/models/eft/common/tables/IItem"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IBarterScheme, ITrader } from "@spt/models/eft/common/tables/ITrader"; import { Money } from "@spt/models/enums/Money"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -6,7 +6,7 @@ import { HashUtil } from "@spt/utils/HashUtil"; export class FluentAssortConstructor { - protected itemsToSell: Item[] = []; + protected itemsToSell: IItem[] = []; protected barterScheme: Record = {}; protected loyaltyLevel: Record = {}; protected hashUtil: HashUtil; @@ -26,7 +26,7 @@ export class FluentAssortConstructor public createSingleAssortItem(itemTpl: string, itemId: string = undefined): FluentAssortConstructor { // Create item ready for insertion into assort table - const newItemToAdd: Item = { + const newItemToAdd: IItem = { _id: itemId ?? this.hashUtil.generate(), _tpl: itemTpl, parentId: "hideout", // Should always be "hideout" @@ -42,7 +42,7 @@ export class FluentAssortConstructor return this; } - public createComplexAssortItem(items: Item[]): FluentAssortConstructor + public createComplexAssortItem(items: IItem[]): FluentAssortConstructor { items[0].parentId = "hideout"; items[0].slotId = "hideout"; diff --git a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/13AddTrader/types/callbacks/LocationCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/13AddTrader/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/13AddTrader/types/callbacks/TraderCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/13AddTrader/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/13AddTrader/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/13AddTrader/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts b/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts +++ b/TypeScript/13AddTrader/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/13AddTrader/types/controllers/BotController.d.ts b/TypeScript/13AddTrader/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/13AddTrader/types/controllers/BotController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts b/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts b/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts b/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/13AddTrader/types/controllers/LocationController.d.ts b/TypeScript/13AddTrader/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/13AddTrader/types/controllers/LocationController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts b/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts b/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts b/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts b/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts b/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts b/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts b/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/13AddTrader/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/13AddTrader/types/loaders/PreSptModLoader.d.ts b/TypeScript/13AddTrader/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/13AddTrader/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/13AddTrader/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/13AddTrader/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/13AddTrader/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/13AddTrader/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/13AddTrader/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/13AddTrader/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/13AddTrader/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/13AddTrader/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/13AddTrader/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/13AddTrader/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/13AddTrader/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/13AddTrader/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/13AddTrader/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/13AddTrader/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/13AddTrader/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/13AddTrader/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/13AddTrader/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/13AddTrader/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/13AddTrader/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/13AddTrader/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/13AddTrader/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/13AddTrader/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/13AddTrader/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/13AddTrader/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/13AddTrader/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/13AddTrader/types/models/enums/AirdropType.d.ts b/TypeScript/13AddTrader/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/13AddTrader/types/models/enums/AirdropType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/13AddTrader/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/13AddTrader/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/13AddTrader/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/13AddTrader/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/13AddTrader/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/13AddTrader/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/13AddTrader/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/13AddTrader/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/13AddTrader/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/IBotDurability.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/13AddTrader/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/13AddTrader/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/13AddTrader/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/13AddTrader/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/13AddTrader/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/13AddTrader/types/models/spt/services/CustomPreset.d.ts b/TypeScript/13AddTrader/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/13AddTrader/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/13AddTrader/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/13AddTrader/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/13AddTrader/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/13AddTrader/types/models/spt/services/ILootRequest.d.ts b/TypeScript/13AddTrader/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/13AddTrader/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/13AddTrader/types/models/spt/services/LootItem.d.ts b/TypeScript/13AddTrader/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/13AddTrader/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts b/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/13AddTrader/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/13AddTrader/types/models/spt/utils/ILogger.d.ts b/TypeScript/13AddTrader/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/13AddTrader/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts b/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/13AddTrader/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/13AddTrader/types/services/AirdropService.d.ts b/TypeScript/13AddTrader/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/13AddTrader/types/services/AirdropService.d.ts +++ b/TypeScript/13AddTrader/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts b/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts b/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/13AddTrader/types/services/BotNameService.d.ts b/TypeScript/13AddTrader/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/13AddTrader/types/services/BotNameService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/13AddTrader/types/services/CircleOfCultistService.d.ts b/TypeScript/13AddTrader/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/13AddTrader/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/13AddTrader/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/13AddTrader/types/services/InMemoryCacheService.d.ts b/TypeScript/13AddTrader/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/13AddTrader/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts b/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/13AddTrader/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/13AddTrader/types/services/MailSendService.d.ts b/TypeScript/13AddTrader/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/13AddTrader/types/services/MailSendService.d.ts +++ b/TypeScript/13AddTrader/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts b/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/13AddTrader/types/services/RagfairLinkedItemService.d.ts b/TypeScript/13AddTrader/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/13AddTrader/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/13AddTrader/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/13AddTrader/types/services/RaidWeatherService.d.ts b/TypeScript/13AddTrader/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/13AddTrader/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/13AddTrader/types/services/RepairService.d.ts b/TypeScript/13AddTrader/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/13AddTrader/types/services/RepairService.d.ts +++ b/TypeScript/13AddTrader/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/13AddTrader/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts b/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/13AddTrader/types/utils/TimeUtil.d.ts b/TypeScript/13AddTrader/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/13AddTrader/types/utils/TimeUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/13AddTrader/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/13AddTrader/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/13AddTrader/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/13AddTrader/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts b/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/PreSptModLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/AirdropType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/AirdropType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotDurability.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/ILootRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootItem.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/utils/ILogger.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/14AfterDBLoadHook/types/services/AirdropService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/AirdropService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/14AfterDBLoadHook/types/services/CircleOfCultistService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/InMemoryCacheService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/14AfterDBLoadHook/types/services/RagfairLinkedItemService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/14AfterDBLoadHook/types/services/RaidWeatherService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/14AfterDBLoadHook/types/utils/TimeUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/TimeUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts b/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts +++ b/TypeScript/15HttpListenerExample/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/loaders/PreSptModLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/AirdropType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/AirdropType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/15HttpListenerExample/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotDurability.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/15HttpListenerExample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/15HttpListenerExample/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/15HttpListenerExample/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/ILootRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/LootItem.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/15HttpListenerExample/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/15HttpListenerExample/types/models/spt/utils/ILogger.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts b/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/15HttpListenerExample/types/services/AirdropService.d.ts b/TypeScript/15HttpListenerExample/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/15HttpListenerExample/types/services/AirdropService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/15HttpListenerExample/types/services/CircleOfCultistService.d.ts b/TypeScript/15HttpListenerExample/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/15HttpListenerExample/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/15HttpListenerExample/types/services/InMemoryCacheService.d.ts b/TypeScript/15HttpListenerExample/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts b/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts b/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/15HttpListenerExample/types/services/RagfairLinkedItemService.d.ts b/TypeScript/15HttpListenerExample/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/15HttpListenerExample/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/15HttpListenerExample/types/services/RaidWeatherService.d.ts b/TypeScript/15HttpListenerExample/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts b/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts b/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/15HttpListenerExample/types/utils/TimeUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/15HttpListenerExample/types/utils/TimeUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/15HttpListenerExample/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/15HttpListenerExample/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/15HttpListenerExample/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts b/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts +++ b/TypeScript/16ImporterUtil/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts b/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts b/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts b/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts b/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/16ImporterUtil/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/16ImporterUtil/types/loaders/PreSptModLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/16ImporterUtil/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/16ImporterUtil/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/16ImporterUtil/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/16ImporterUtil/types/models/enums/AirdropType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/AirdropType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/16ImporterUtil/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/16ImporterUtil/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IBotDurability.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/16ImporterUtil/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/16ImporterUtil/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/16ImporterUtil/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/16ImporterUtil/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/ILootRequest.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/LootItem.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts b/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/16ImporterUtil/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/16ImporterUtil/types/models/spt/utils/ILogger.d.ts b/TypeScript/16ImporterUtil/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts b/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/16ImporterUtil/types/services/AirdropService.d.ts b/TypeScript/16ImporterUtil/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/16ImporterUtil/types/services/AirdropService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts b/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts b/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts b/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/16ImporterUtil/types/services/CircleOfCultistService.d.ts b/TypeScript/16ImporterUtil/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/16ImporterUtil/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/16ImporterUtil/types/services/InMemoryCacheService.d.ts b/TypeScript/16ImporterUtil/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts b/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts b/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/16ImporterUtil/types/services/RagfairLinkedItemService.d.ts b/TypeScript/16ImporterUtil/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/16ImporterUtil/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/16ImporterUtil/types/services/RaidWeatherService.d.ts b/TypeScript/16ImporterUtil/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/16ImporterUtil/types/services/RepairService.d.ts b/TypeScript/16ImporterUtil/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/16ImporterUtil/types/services/RepairService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts b/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/16ImporterUtil/types/utils/TimeUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/16ImporterUtil/types/utils/TimeUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/16ImporterUtil/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/16ImporterUtil/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/16ImporterUtil/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreSptModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/AirdropType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/AirdropType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotDurability.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/ILootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootItem.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/utils/ILogger.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/AirdropService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/AirdropService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/CircleOfCultistService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InMemoryCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairLinkedItemService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RaidWeatherService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/TimeUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/TimeUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreSptModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/AirdropType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/AirdropType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotDurability.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/ILootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootItem.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/utils/ILogger.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/AirdropService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/AirdropService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/CircleOfCultistService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InMemoryCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairLinkedItemService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RaidWeatherService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/TimeUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/TimeUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/LocationCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/TraderCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/BotController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/BotController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/DialogueController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/DialogueController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HideoutController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HideoutController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LauncherController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LauncherController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LocationController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LocationController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/MatchController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/MatchController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/RagfairController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/RagfairController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotInventoryGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotWeaponGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/LootGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/LootGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/PlayerScavGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/BotHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/BotHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/DialogueHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HealthHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HealthHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HideoutHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InventoryHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotificationSendHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotifierHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ProfileHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RepairHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RepairHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/loaders/PreSptModLoader.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 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 @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/AirdropType.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/AirdropType.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotDurability.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: 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 3a2de2a..af0ec79 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } 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 8fd2e5f..2e68219 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } 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 a62f2c9..9b17861 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomPreset.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/ILootRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootItem.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootRequest.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/utils/ILogger.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/routers/EventOutputHolder.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/AirdropService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/AirdropService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotEquipmentFilterService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotLootCacheService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotLootCacheService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/CircleOfCultistService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/InMemoryCacheService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/MailSendService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/MailSendService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileSnapshotService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/RagfairLinkedItemService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/RaidWeatherService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/RepairService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/RepairService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/mod/CustomItemService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/utils/TimeUtil.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/utils/TimeUtil.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18CustomItemService/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/18CustomItemService/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts b/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts +++ b/TypeScript/18CustomItemService/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts b/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts b/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts b/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts b/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts b/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/18CustomItemService/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/18CustomItemService/types/loaders/PreSptModLoader.d.ts b/TypeScript/18CustomItemService/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/18CustomItemService/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/18CustomItemService/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/18CustomItemService/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/18CustomItemService/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/18CustomItemService/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/18CustomItemService/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/18CustomItemService/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/18CustomItemService/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/18CustomItemService/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/18CustomItemService/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/18CustomItemService/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/18CustomItemService/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/18CustomItemService/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/18CustomItemService/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/18CustomItemService/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/18CustomItemService/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/18CustomItemService/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/18CustomItemService/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/18CustomItemService/types/models/enums/AirdropType.d.ts b/TypeScript/18CustomItemService/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/18CustomItemService/types/models/enums/AirdropType.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/18CustomItemService/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/18CustomItemService/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/18CustomItemService/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/18CustomItemService/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/18CustomItemService/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/18CustomItemService/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/18CustomItemService/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IBotDurability.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/18CustomItemService/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/18CustomItemService/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/18CustomItemService/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/18CustomItemService/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/18CustomItemService/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/18CustomItemService/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/18CustomItemService/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/18CustomItemService/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/18CustomItemService/types/models/spt/services/ILootRequest.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/18CustomItemService/types/models/spt/services/LootItem.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/18CustomItemService/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts b/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/18CustomItemService/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/18CustomItemService/types/models/spt/utils/ILogger.d.ts b/TypeScript/18CustomItemService/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/18CustomItemService/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts b/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/18CustomItemService/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/18CustomItemService/types/services/AirdropService.d.ts b/TypeScript/18CustomItemService/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/18CustomItemService/types/services/AirdropService.d.ts +++ b/TypeScript/18CustomItemService/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts b/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts b/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/18CustomItemService/types/services/BotNameService.d.ts b/TypeScript/18CustomItemService/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/18CustomItemService/types/services/BotNameService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/18CustomItemService/types/services/CircleOfCultistService.d.ts b/TypeScript/18CustomItemService/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/18CustomItemService/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/18CustomItemService/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/18CustomItemService/types/services/InMemoryCacheService.d.ts b/TypeScript/18CustomItemService/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/18CustomItemService/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts b/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/18CustomItemService/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/18CustomItemService/types/services/MailSendService.d.ts b/TypeScript/18CustomItemService/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/18CustomItemService/types/services/MailSendService.d.ts +++ b/TypeScript/18CustomItemService/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/18CustomItemService/types/services/RagfairLinkedItemService.d.ts b/TypeScript/18CustomItemService/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/18CustomItemService/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/18CustomItemService/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/18CustomItemService/types/services/RaidWeatherService.d.ts b/TypeScript/18CustomItemService/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/18CustomItemService/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/18CustomItemService/types/services/RepairService.d.ts b/TypeScript/18CustomItemService/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/18CustomItemService/types/services/RepairService.d.ts +++ b/TypeScript/18CustomItemService/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/18CustomItemService/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts b/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/18CustomItemService/types/utils/TimeUtil.d.ts b/TypeScript/18CustomItemService/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/18CustomItemService/types/utils/TimeUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/18CustomItemService/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/18CustomItemService/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/18CustomItemService/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/18CustomItemService/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/LocationCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/TraderCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts b/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/19UseExternalLibraries/types/controllers/RagfairController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/RagfairController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/DialogueHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/19UseExternalLibraries/types/loaders/PreSptModLoader.d.ts b/TypeScript/19UseExternalLibraries/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/19UseExternalLibraries/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/19UseExternalLibraries/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/AirdropType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/AirdropType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotDurability.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/services/CustomPreset.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/services/ILootRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/services/LootItem.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/utils/ILogger.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts b/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts b/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/19UseExternalLibraries/types/services/AirdropService.d.ts b/TypeScript/19UseExternalLibraries/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/19UseExternalLibraries/types/services/AirdropService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/19UseExternalLibraries/types/services/BotEquipmentFilterService.d.ts b/TypeScript/19UseExternalLibraries/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/19UseExternalLibraries/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts b/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts b/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/19UseExternalLibraries/types/services/CircleOfCultistService.d.ts b/TypeScript/19UseExternalLibraries/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/19UseExternalLibraries/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/19UseExternalLibraries/types/services/InMemoryCacheService.d.ts b/TypeScript/19UseExternalLibraries/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts b/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/19UseExternalLibraries/types/services/MailSendService.d.ts b/TypeScript/19UseExternalLibraries/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/19UseExternalLibraries/types/services/MailSendService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/19UseExternalLibraries/types/services/RagfairLinkedItemService.d.ts b/TypeScript/19UseExternalLibraries/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/19UseExternalLibraries/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/19UseExternalLibraries/types/services/RaidWeatherService.d.ts b/TypeScript/19UseExternalLibraries/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts b/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts b/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/19UseExternalLibraries/types/utils/TimeUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/TimeUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/19UseExternalLibraries/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/19UseExternalLibraries/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts b/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts +++ b/TypeScript/1LogToConsole/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts b/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts b/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts b/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/1LogToConsole/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/1LogToConsole/types/loaders/PreSptModLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/1LogToConsole/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/1LogToConsole/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/1LogToConsole/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/1LogToConsole/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/1LogToConsole/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/1LogToConsole/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/1LogToConsole/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/1LogToConsole/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/1LogToConsole/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/1LogToConsole/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/1LogToConsole/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/1LogToConsole/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/1LogToConsole/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/1LogToConsole/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/1LogToConsole/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/1LogToConsole/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/1LogToConsole/types/models/enums/AirdropType.d.ts b/TypeScript/1LogToConsole/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/1LogToConsole/types/models/enums/AirdropType.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/1LogToConsole/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/1LogToConsole/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/1LogToConsole/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/1LogToConsole/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/1LogToConsole/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/1LogToConsole/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/1LogToConsole/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBotDurability.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/1LogToConsole/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/1LogToConsole/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/1LogToConsole/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/1LogToConsole/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/1LogToConsole/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/1LogToConsole/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/1LogToConsole/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/1LogToConsole/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/1LogToConsole/types/models/spt/services/CustomPreset.d.ts b/TypeScript/1LogToConsole/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/1LogToConsole/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/1LogToConsole/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/1LogToConsole/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/1LogToConsole/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/1LogToConsole/types/models/spt/services/ILootRequest.d.ts b/TypeScript/1LogToConsole/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/1LogToConsole/types/models/spt/services/LootItem.d.ts b/TypeScript/1LogToConsole/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/1LogToConsole/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts b/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/1LogToConsole/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/1LogToConsole/types/models/spt/utils/ILogger.d.ts b/TypeScript/1LogToConsole/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/1LogToConsole/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts b/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/1LogToConsole/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/1LogToConsole/types/services/AirdropService.d.ts b/TypeScript/1LogToConsole/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/1LogToConsole/types/services/AirdropService.d.ts +++ b/TypeScript/1LogToConsole/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts b/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts b/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/1LogToConsole/types/services/BotNameService.d.ts b/TypeScript/1LogToConsole/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/1LogToConsole/types/services/BotNameService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/1LogToConsole/types/services/CircleOfCultistService.d.ts b/TypeScript/1LogToConsole/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/1LogToConsole/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/1LogToConsole/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/1LogToConsole/types/services/InMemoryCacheService.d.ts b/TypeScript/1LogToConsole/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/1LogToConsole/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts b/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/1LogToConsole/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/1LogToConsole/types/services/MailSendService.d.ts b/TypeScript/1LogToConsole/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/1LogToConsole/types/services/MailSendService.d.ts +++ b/TypeScript/1LogToConsole/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts b/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/1LogToConsole/types/services/RaidWeatherService.d.ts b/TypeScript/1LogToConsole/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/1LogToConsole/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/1LogToConsole/types/services/RepairService.d.ts b/TypeScript/1LogToConsole/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/1LogToConsole/types/services/RepairService.d.ts +++ b/TypeScript/1LogToConsole/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/1LogToConsole/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts b/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/1LogToConsole/types/utils/TimeUtil.d.ts b/TypeScript/1LogToConsole/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/1LogToConsole/types/utils/TimeUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/1LogToConsole/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/1LogToConsole/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/1LogToConsole/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/1LogToConsole/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/20CustomChatBot/types/callbacks/LocationCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/20CustomChatBot/types/callbacks/TraderCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/20CustomChatBot/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts b/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts +++ b/TypeScript/20CustomChatBot/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts b/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts b/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/20CustomChatBot/types/controllers/LauncherController.d.ts b/TypeScript/20CustomChatBot/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/20CustomChatBot/types/controllers/LauncherController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts b/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts b/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/20CustomChatBot/types/controllers/RagfairController.d.ts b/TypeScript/20CustomChatBot/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/20CustomChatBot/types/controllers/RagfairController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts b/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/20CustomChatBot/types/helpers/DialogueHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/20CustomChatBot/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/20CustomChatBot/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/20CustomChatBot/types/loaders/PreSptModLoader.d.ts b/TypeScript/20CustomChatBot/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/20CustomChatBot/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/20CustomChatBot/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/20CustomChatBot/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/20CustomChatBot/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/20CustomChatBot/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/20CustomChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/20CustomChatBot/types/models/enums/AirdropType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/AirdropType.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/20CustomChatBot/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/20CustomChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IBotDurability.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/20CustomChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/20CustomChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/20CustomChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/20CustomChatBot/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/20CustomChatBot/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/20CustomChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/20CustomChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/20CustomChatBot/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/20CustomChatBot/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/20CustomChatBot/types/models/spt/services/CustomPreset.d.ts b/TypeScript/20CustomChatBot/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/20CustomChatBot/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/20CustomChatBot/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/20CustomChatBot/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/20CustomChatBot/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/20CustomChatBot/types/models/spt/services/ILootRequest.d.ts b/TypeScript/20CustomChatBot/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/20CustomChatBot/types/models/spt/services/LootItem.d.ts b/TypeScript/20CustomChatBot/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts b/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/20CustomChatBot/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/20CustomChatBot/types/models/spt/utils/ILogger.d.ts b/TypeScript/20CustomChatBot/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts b/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts b/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/20CustomChatBot/types/services/AirdropService.d.ts b/TypeScript/20CustomChatBot/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/20CustomChatBot/types/services/AirdropService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/20CustomChatBot/types/services/BotEquipmentFilterService.d.ts b/TypeScript/20CustomChatBot/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/20CustomChatBot/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts b/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts b/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/20CustomChatBot/types/services/CircleOfCultistService.d.ts b/TypeScript/20CustomChatBot/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/20CustomChatBot/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/20CustomChatBot/types/services/InMemoryCacheService.d.ts b/TypeScript/20CustomChatBot/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts b/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/20CustomChatBot/types/services/MailSendService.d.ts b/TypeScript/20CustomChatBot/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/20CustomChatBot/types/services/MailSendService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/20CustomChatBot/types/services/RagfairLinkedItemService.d.ts b/TypeScript/20CustomChatBot/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/20CustomChatBot/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/20CustomChatBot/types/services/RaidWeatherService.d.ts b/TypeScript/20CustomChatBot/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/20CustomChatBot/types/services/RepairService.d.ts b/TypeScript/20CustomChatBot/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/20CustomChatBot/types/services/RepairService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts b/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/20CustomChatBot/types/utils/TimeUtil.d.ts b/TypeScript/20CustomChatBot/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/20CustomChatBot/types/utils/TimeUtil.d.ts +++ b/TypeScript/20CustomChatBot/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/20CustomChatBot/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/20CustomChatBot/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/20CustomChatBot/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/20CustomChatBot/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/LocationCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/TraderCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts b/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/LauncherController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/LauncherController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/RagfairController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/RagfairController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/DialogueHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/21CustomCommandoCommand/types/loaders/PreSptModLoader.d.ts b/TypeScript/21CustomCommandoCommand/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/21CustomCommandoCommand/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/AirdropType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/AirdropType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotDurability.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomPreset.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/services/ILootRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootItem.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/utils/ILogger.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/21CustomCommandoCommand/types/services/AirdropService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/AirdropService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/BotEquipmentFilterService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/21CustomCommandoCommand/types/services/CircleOfCultistService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/InMemoryCacheService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/21CustomCommandoCommand/types/services/MailSendService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/MailSendService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/21CustomCommandoCommand/types/services/RagfairLinkedItemService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/21CustomCommandoCommand/types/services/RaidWeatherService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/services/RepairService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/RepairService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/21CustomCommandoCommand/types/utils/TimeUtil.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/21CustomCommandoCommand/types/utils/TimeUtil.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/21CustomCommandoCommand/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/21CustomCommandoCommand/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts b/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts +++ b/TypeScript/22CustomSptCommand/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts b/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts +++ b/TypeScript/22CustomSptCommand/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts b/TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/22CustomSptCommand/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/22CustomSptCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/ILootRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/22CustomSptCommand/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts b/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/22CustomSptCommand/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts b/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/22CustomSptCommand/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/22CustomSptCommand/types/services/AirdropService.d.ts b/TypeScript/22CustomSptCommand/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/22CustomSptCommand/types/services/AirdropService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/22CustomSptCommand/types/services/CircleOfCultistService.d.ts b/TypeScript/22CustomSptCommand/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/22CustomSptCommand/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/22CustomSptCommand/types/services/InMemoryCacheService.d.ts b/TypeScript/22CustomSptCommand/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts b/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts b/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/22CustomSptCommand/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts b/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/22CustomSptCommand/types/services/RaidWeatherService.d.ts b/TypeScript/22CustomSptCommand/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts b/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts b/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts b/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts +++ b/TypeScript/22CustomSptCommand/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/22CustomSptCommand/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts b/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts b/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts b/TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/AirdropType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/AirdropType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/ILootRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootItem.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts b/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts b/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/AirdropService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/AirdropService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/23CustomAbstractChatBot/types/services/CircleOfCultistService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/InMemoryCacheService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RaidWeatherService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts b/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts +++ b/TypeScript/24WebSocket/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/24WebSocket/types/controllers/BotController.d.ts b/TypeScript/24WebSocket/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/24WebSocket/types/controllers/BotController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts b/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts b/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts b/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts b/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/24WebSocket/types/controllers/LocationController.d.ts b/TypeScript/24WebSocket/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/24WebSocket/types/controllers/LocationController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/24WebSocket/types/controllers/MatchController.d.ts b/TypeScript/24WebSocket/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/24WebSocket/types/controllers/MatchController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts b/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts b/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts +++ b/TypeScript/24WebSocket/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts b/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts b/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts b/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts b/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts b/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts b/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts b/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts b/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts b/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts b/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts b/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts b/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts b/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/24WebSocket/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts b/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/24WebSocket/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/24WebSocket/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/24WebSocket/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/24WebSocket/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/24WebSocket/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/24WebSocket/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/24WebSocket/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/24WebSocket/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/24WebSocket/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/24WebSocket/types/models/enums/AirdropType.d.ts b/TypeScript/24WebSocket/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/24WebSocket/types/models/enums/AirdropType.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/24WebSocket/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/24WebSocket/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/24WebSocket/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/24WebSocket/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/24WebSocket/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/24WebSocket/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/24WebSocket/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/24WebSocket/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/24WebSocket/types/models/spt/config/IBotDurability.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/24WebSocket/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/24WebSocket/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/24WebSocket/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/24WebSocket/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/24WebSocket/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/24WebSocket/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/24WebSocket/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/24WebSocket/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/24WebSocket/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts b/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/24WebSocket/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/24WebSocket/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/24WebSocket/types/models/spt/services/ILootRequest.d.ts b/TypeScript/24WebSocket/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/24WebSocket/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/24WebSocket/types/models/spt/services/LootItem.d.ts b/TypeScript/24WebSocket/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/24WebSocket/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts b/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/24WebSocket/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts b/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts b/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/24WebSocket/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts b/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/24WebSocket/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/24WebSocket/types/services/AirdropService.d.ts b/TypeScript/24WebSocket/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/24WebSocket/types/services/AirdropService.d.ts +++ b/TypeScript/24WebSocket/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts b/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts b/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/24WebSocket/types/services/BotNameService.d.ts b/TypeScript/24WebSocket/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/24WebSocket/types/services/BotNameService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/24WebSocket/types/services/CircleOfCultistService.d.ts b/TypeScript/24WebSocket/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/24WebSocket/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/24WebSocket/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/24WebSocket/types/services/InMemoryCacheService.d.ts b/TypeScript/24WebSocket/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/24WebSocket/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts b/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/24WebSocket/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/24WebSocket/types/services/MailSendService.d.ts b/TypeScript/24WebSocket/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/24WebSocket/types/services/MailSendService.d.ts +++ b/TypeScript/24WebSocket/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts +++ b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts b/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/24WebSocket/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts b/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/24WebSocket/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/24WebSocket/types/services/RaidWeatherService.d.ts b/TypeScript/24WebSocket/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/24WebSocket/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/24WebSocket/types/services/RepairService.d.ts b/TypeScript/24WebSocket/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/24WebSocket/types/services/RepairService.d.ts +++ b/TypeScript/24WebSocket/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts +++ b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/24WebSocket/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts b/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/24WebSocket/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/24WebSocket/types/utils/TimeUtil.d.ts b/TypeScript/24WebSocket/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/24WebSocket/types/utils/TimeUtil.d.ts +++ b/TypeScript/24WebSocket/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/24WebSocket/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts b/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts +++ b/TypeScript/2EditDatabase/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts b/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts b/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts b/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts b/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts b/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/2EditDatabase/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/2EditDatabase/types/loaders/PreSptModLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/2EditDatabase/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/2EditDatabase/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/2EditDatabase/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/2EditDatabase/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/2EditDatabase/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/2EditDatabase/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/2EditDatabase/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/2EditDatabase/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/2EditDatabase/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/2EditDatabase/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/2EditDatabase/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/2EditDatabase/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/2EditDatabase/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/2EditDatabase/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/2EditDatabase/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/2EditDatabase/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/2EditDatabase/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/2EditDatabase/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/2EditDatabase/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/2EditDatabase/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/2EditDatabase/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/2EditDatabase/types/models/enums/AirdropType.d.ts b/TypeScript/2EditDatabase/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/2EditDatabase/types/models/enums/AirdropType.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/2EditDatabase/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/2EditDatabase/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/2EditDatabase/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/2EditDatabase/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/2EditDatabase/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/2EditDatabase/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/2EditDatabase/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IBotDurability.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/2EditDatabase/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/2EditDatabase/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/2EditDatabase/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/2EditDatabase/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/2EditDatabase/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/2EditDatabase/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/2EditDatabase/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/2EditDatabase/types/models/spt/services/CustomPreset.d.ts b/TypeScript/2EditDatabase/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/2EditDatabase/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/2EditDatabase/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/2EditDatabase/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/2EditDatabase/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/2EditDatabase/types/models/spt/services/ILootRequest.d.ts b/TypeScript/2EditDatabase/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/2EditDatabase/types/models/spt/services/LootItem.d.ts b/TypeScript/2EditDatabase/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/2EditDatabase/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts b/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/2EditDatabase/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/2EditDatabase/types/models/spt/utils/ILogger.d.ts b/TypeScript/2EditDatabase/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/2EditDatabase/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts b/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/2EditDatabase/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/2EditDatabase/types/services/AirdropService.d.ts b/TypeScript/2EditDatabase/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/2EditDatabase/types/services/AirdropService.d.ts +++ b/TypeScript/2EditDatabase/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts b/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts b/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/2EditDatabase/types/services/BotNameService.d.ts b/TypeScript/2EditDatabase/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/2EditDatabase/types/services/BotNameService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/2EditDatabase/types/services/CircleOfCultistService.d.ts b/TypeScript/2EditDatabase/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/2EditDatabase/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/2EditDatabase/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/2EditDatabase/types/services/InMemoryCacheService.d.ts b/TypeScript/2EditDatabase/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/2EditDatabase/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts b/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/2EditDatabase/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/2EditDatabase/types/services/MailSendService.d.ts b/TypeScript/2EditDatabase/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/2EditDatabase/types/services/MailSendService.d.ts +++ b/TypeScript/2EditDatabase/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts b/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/2EditDatabase/types/services/RaidWeatherService.d.ts b/TypeScript/2EditDatabase/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/2EditDatabase/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/2EditDatabase/types/services/RepairService.d.ts b/TypeScript/2EditDatabase/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/2EditDatabase/types/services/RepairService.d.ts +++ b/TypeScript/2EditDatabase/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts +++ b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/2EditDatabase/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts b/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/2EditDatabase/types/utils/TimeUtil.d.ts b/TypeScript/2EditDatabase/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/2EditDatabase/types/utils/TimeUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/2EditDatabase/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/2EditDatabase/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/2EditDatabase/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/2EditDatabase/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts b/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/loaders/PreSptModLoader.d.ts b/TypeScript/3GetSptConfigFile/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/3GetSptConfigFile/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/3GetSptConfigFile/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/AirdropType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/AirdropType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotDurability.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/services/CustomPreset.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/services/ILootRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/services/LootItem.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/utils/ILogger.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts b/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/3GetSptConfigFile/types/services/AirdropService.d.ts b/TypeScript/3GetSptConfigFile/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/3GetSptConfigFile/types/services/AirdropService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/3GetSptConfigFile/types/services/CircleOfCultistService.d.ts b/TypeScript/3GetSptConfigFile/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/3GetSptConfigFile/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/3GetSptConfigFile/types/services/InMemoryCacheService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts b/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/3GetSptConfigFile/types/services/MailSendService.d.ts b/TypeScript/3GetSptConfigFile/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/3GetSptConfigFile/types/services/MailSendService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/3GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts b/TypeScript/3GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/3GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/3GetSptConfigFile/types/services/RaidWeatherService.d.ts b/TypeScript/3GetSptConfigFile/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts b/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts b/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/3GetSptConfigFile/types/utils/TimeUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/TimeUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/3GetSptConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/3GetSptConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/LocationCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/TraderCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/PreSptModLoader.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 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 @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/AirdropType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/AirdropType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotDurability.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: 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 3a2de2a..af0ec79 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } 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 8fd2e5f..2e68219 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } 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 a62f2c9..9b17861 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomPreset.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/ILootRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootItem.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/utils/ILogger.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/AirdropService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/AirdropService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotEquipmentFilterService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CircleOfCultistService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InMemoryCacheService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/MailSendService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/MailSendService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairLinkedItemService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RaidWeatherService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/TimeUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/TimeUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts b/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/PreSptModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/AirdropType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/AirdropType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotDurability.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/ILootRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootItem.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/utils/ILogger.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/4UseACustomConfigFile/types/services/AirdropService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/AirdropService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/4UseACustomConfigFile/types/services/CircleOfCultistService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/InMemoryCacheService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/4UseACustomConfigFile/types/services/RaidWeatherService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/4UseACustomConfigFile/types/utils/TimeUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/TimeUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts b/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts +++ b/TypeScript/5ReplaceMethod/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/loaders/PreSptModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/AirdropType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/AirdropType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/5ReplaceMethod/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotDurability.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/5ReplaceMethod/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/5ReplaceMethod/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/5ReplaceMethod/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/ILootRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/LootItem.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/5ReplaceMethod/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/5ReplaceMethod/types/models/spt/utils/ILogger.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts b/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/5ReplaceMethod/types/services/AirdropService.d.ts b/TypeScript/5ReplaceMethod/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/5ReplaceMethod/types/services/AirdropService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/5ReplaceMethod/types/services/CircleOfCultistService.d.ts b/TypeScript/5ReplaceMethod/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/5ReplaceMethod/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/5ReplaceMethod/types/services/InMemoryCacheService.d.ts b/TypeScript/5ReplaceMethod/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts b/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts b/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts b/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/5ReplaceMethod/types/services/RaidWeatherService.d.ts b/TypeScript/5ReplaceMethod/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts b/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/5ReplaceMethod/types/utils/TimeUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/5ReplaceMethod/types/utils/TimeUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/5ReplaceMethod/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/5ReplaceMethod/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/5ReplaceMethod/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts b/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/PreSptModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/AirdropType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/AirdropType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotDurability.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/ILootRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootItem.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/utils/ILogger.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/AirdropService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/AirdropService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/services/CircleOfCultistService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InMemoryCacheService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RaidWeatherService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/TimeUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/TimeUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts b/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts +++ b/TypeScript/7OnLoadHook/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/7OnLoadHook/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/7OnLoadHook/types/loaders/PreSptModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/7OnLoadHook/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/7OnLoadHook/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/7OnLoadHook/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/7OnLoadHook/types/models/enums/AirdropType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/AirdropType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/7OnLoadHook/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/7OnLoadHook/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IBotDurability.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/7OnLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/7OnLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/7OnLoadHook/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/7OnLoadHook/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/ILootRequest.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/LootItem.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts b/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/7OnLoadHook/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/7OnLoadHook/types/models/spt/utils/ILogger.d.ts b/TypeScript/7OnLoadHook/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts b/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/7OnLoadHook/types/services/AirdropService.d.ts b/TypeScript/7OnLoadHook/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/7OnLoadHook/types/services/AirdropService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts b/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts b/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts b/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/7OnLoadHook/types/services/CircleOfCultistService.d.ts b/TypeScript/7OnLoadHook/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/7OnLoadHook/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/7OnLoadHook/types/services/InMemoryCacheService.d.ts b/TypeScript/7OnLoadHook/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts b/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts b/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts b/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/7OnLoadHook/types/services/RaidWeatherService.d.ts b/TypeScript/7OnLoadHook/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/7OnLoadHook/types/services/RepairService.d.ts b/TypeScript/7OnLoadHook/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/7OnLoadHook/types/services/RepairService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts b/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/7OnLoadHook/types/utils/TimeUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/7OnLoadHook/types/utils/TimeUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/7OnLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/7OnLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/7OnLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts b/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts +++ b/TypeScript/8OnUpdateHook/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/loaders/PreSptModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/AirdropType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/AirdropType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/8OnUpdateHook/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotDurability.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/8OnUpdateHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/8OnUpdateHook/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/8OnUpdateHook/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/ILootRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/LootItem.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/8OnUpdateHook/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/8OnUpdateHook/types/models/spt/utils/ILogger.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts b/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/8OnUpdateHook/types/services/AirdropService.d.ts b/TypeScript/8OnUpdateHook/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/8OnUpdateHook/types/services/AirdropService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/8OnUpdateHook/types/services/CircleOfCultistService.d.ts b/TypeScript/8OnUpdateHook/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/8OnUpdateHook/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/8OnUpdateHook/types/services/InMemoryCacheService.d.ts b/TypeScript/8OnUpdateHook/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts b/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts b/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts b/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/8OnUpdateHook/types/services/RaidWeatherService.d.ts b/TypeScript/8OnUpdateHook/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts b/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/8OnUpdateHook/types/utils/TimeUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/8OnUpdateHook/types/utils/TimeUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/8OnUpdateHook/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/8OnUpdateHook/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/8OnUpdateHook/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise; diff --git a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts index baee279..e65749f 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts @@ -27,7 +27,7 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; import { HashUtil } from "@spt/utils/HashUtil"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; @@ -48,11 +48,11 @@ export declare class DialogueCallbacks implements OnUpdate { */ getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/list */ - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/view */ getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/info */ - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/remove */ removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/mail/dialog/pin */ diff --git a/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts index 2d121b0..f3ffea3 100644 --- a/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/LocationCallbacks.d.ts @@ -2,6 +2,7 @@ import { LocationController } from "@spt/controllers/LocationController"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class LocationCallbacks { @@ -11,5 +12,5 @@ export declare class LocationCallbacks { /** Handle client/locations */ getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/airdrop/loot */ - getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getAirdropLoot(url: string, info: IGetAirdropLootRequest, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts index 5177d99..7bebe55 100644 --- a/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/TraderCallbacks.d.ts @@ -4,7 +4,7 @@ import { OnUpdate } from "@spt/di/OnUpdate"; import { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData"; import { ITraderAssort, ITraderBase } from "@spt/models/eft/common/tables/ITrader"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; -import { ModdedTraders } from "@spt/models/spt/config/ITraderConfig"; +import { IModdedTraders } from "@spt/models/spt/config/ITraderConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil"; export declare class TraderCallbacks implements OnLoad, OnUpdate { @@ -23,5 +23,5 @@ export declare class TraderCallbacks implements OnLoad, OnUpdate { /** Handle client/trading/api/getTraderAssort */ getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle /singleplayer/moddedTraders */ - getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getModdedTraderData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts index 8229592..ef5808f 100644 --- a/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/WeatherCallbacks.d.ts @@ -13,5 +13,6 @@ export declare class WeatherCallbacks { * @returns IWeatherData */ getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + /** Handle client/localGame/weather */ getLocalWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts b/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts index 0722a98..38facc6 100644 --- a/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts +++ b/TypeScript/9RouterHooks/types/context/ContextVariableType.d.ts @@ -7,5 +7,7 @@ export declare enum ContextVariableType { CLIENT_START_TIMESTAMP = 2, /** When player is loading into map and loot is requested */ REGISTER_PLAYER_REQUEST = 3, - RAID_ADJUSTMENTS = 4 + RAID_ADJUSTMENTS = 4, + /** Data returned from client request object from endLocalRaid() */ + TRANSIT_INFO = 5 } diff --git a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts index 36477a2..a7cb6ae 100644 --- a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts @@ -11,7 +11,7 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -97,7 +97,7 @@ export declare class BotController { * @param generateAsPmc Force bot being generated a PMC * @returns BotGenerationDetails */ - protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + protected getBotGenerationDetailsForWave(condition: ICondition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, raidSettings: IGetRaidConfigurationRequestData, botCountToGenerate: number, generateAsPmc: boolean): IBotGenerationDetails; /** * Get players profile level * @param pmcProfile Profile to get level from @@ -111,7 +111,7 @@ export declare class BotController { * @param sessionId Session id * @returns A promise for the bots to be done generating */ - protected generateWithBotDetails(condition: ICondition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + protected generateWithBotDetails(condition: ICondition, botGenerationDetails: IBotGenerationDetails, sessionId: string): Promise; /** * Generate a single bot and store in the cache * @param botGenerationDetails the bot details to generate the bot with @@ -119,7 +119,7 @@ export declare class BotController { * @param cacheKey the cache key to store the bot with * @returns A promise for the bot to be stored */ - protected generateSingleBotAndStoreInCache(botGenerationDetails: BotGenerationDetails, sessionId: string, cacheKey: string): Promise; + protected generateSingleBotAndStoreInCache(botGenerationDetails: IBotGenerationDetails, sessionId: string, cacheKey: string): Promise; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id @@ -128,7 +128,7 @@ export declare class BotController { */ protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; protected getPmcConversionMinMaxForLocation(requestedBotRole: string, location: string): MinMax; - protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: BotGenerationDetails, possibleBossTypeWeights: Record): void; + protected updateBotGenerationDetailsToRandomBoss(botGenerationDetails: IBotGenerationDetails, possibleBossTypeWeights: Record): void; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts index c15d724..2f00b13 100644 --- a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts @@ -7,7 +7,7 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { Dialogue, DialogueInfo, ISptProfile, IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -40,14 +40,14 @@ export declare class DialogueController { * @param sessionID Session Id * @returns array of dialogs */ - generateDialogueList(sessionID: string): DialogueInfo[]; + generateDialogueList(sessionID: string): IDialogueInfo[]; /** * Get the content of a dialogue * @param dialogueID Dialog id * @param sessionID Session Id * @returns DialogueInfo */ - getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo; + getDialogueInfo(dialogueID: string, sessionID: string): IDialogueInfo; /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -55,7 +55,7 @@ export declare class DialogueController { * @param sessionID Player id * @returns IUserDialogInfo array */ - getDialogueUsers(dialog: Dialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; + getDialogueUsers(dialog: IDialogue, messageType: MessageType, sessionID: string): IUserDialogInfo[] | undefined; /** * Handle client/mail/dialog/view * Handle player clicking 'messenger' and seeing all the messages they've recieved @@ -72,7 +72,7 @@ export declare class DialogueController { * @param request get dialog request (params used when dialog doesnt exist in profile) * @returns Dialogue */ - protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): Dialogue; + protected getDialogByIdFromProfile(profile: ISptProfile, request: IGetMailDialogViewRequestData): IDialogue; /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -92,7 +92,7 @@ export declare class DialogueController { * @param messages Messages to check * @returns true if uncollected rewards found */ - protected messagesHaveUncollectedRewards(messages: Message[]): boolean; + protected messagesHaveUncollectedRewards(messages: IMessage[]): boolean; /** * Handle client/mail/dialog/remove * Remove an entire dialog with an entity (trader/user) @@ -125,13 +125,13 @@ export declare class DialogueController { * @param dialogueId Dialog to get mail attachments from * @returns Message array */ - protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[]; + protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): IMessage[]; /** * Return array of messages with uncollected items (includes expired) * @param messages Messages to parse * @returns messages with items to collect */ - protected getMessagesWithAttachments(messages: Message[]): Message[]; + protected getMessagesWithAttachments(messages: IMessage[]): IMessage[]; /** * Delete expired items from all messages in player profile. triggers when updating traders. * @param sessionId Session id @@ -148,7 +148,7 @@ export declare class DialogueController { * @param message Message to check expiry of * @returns true or false */ - protected messageHasExpired(message: Message): boolean; + protected messageHasExpired(message: IMessage): boolean; /** Handle client/friend/request/send */ sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts index f65df69..4a92504 100644 --- a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts @@ -7,9 +7,8 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IProduct, ITaskConditionCounter } from "@spt/models/eft/common/tables/IBotBase"; -import { HideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/HideoutUpgradeCompleteRequestData"; import { IHandleQTEEventRequestData } from "@spt/models/eft/hideout/IHandleQTEEventRequestData"; -import { IHideoutArea, Stage } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStage } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideout/IHideoutCancelProductionRequestData"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; @@ -22,8 +21,9 @@ import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideou import { IHideoutTakeItemOutRequestData } from "@spt/models/eft/hideout/IHideoutTakeItemOutRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IHideoutToggleAreaRequestData } from "@spt/models/eft/hideout/IHideoutToggleAreaRequestData"; +import { IHideoutUpgradeCompleteRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeCompleteRequestData"; import { IHideoutUpgradeRequestData } from "@spt/models/eft/hideout/IHideoutUpgradeRequestData"; -import { IQteData } from "@spt/models/eft/hideout/IQteData"; +import { IQteData, IQteResult } from "@spt/models/eft/hideout/IQteData"; import { IRecordShootingRangePoints } from "@spt/models/eft/hideout/IRecordShootingRangePoints"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; @@ -87,7 +87,7 @@ export declare class HideoutController { * @param sessionID Session id * @param output Client response */ - upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; + upgradeComplete(pmcData: IPmcData, request: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void; /** * Upgrade wall status to visible in profile if medstation/water collector are both level 1 * @param pmcData Player profile @@ -101,7 +101,7 @@ export declare class HideoutController { * @param dbHideoutArea Hideout area being upgraded * @param hideoutStage Stage hideout area is being upgraded to */ - protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addContainerImprovementToProfile(output: IItemEventRouterResponse, sessionID: string, pmcData: IPmcData, profileParentHideoutArea: IBotHideoutArea, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage * @param sessionId Session id @@ -110,14 +110,14 @@ export declare class HideoutController { * @param equipmentPresetHideoutArea * @param output Response to send back to client */ - protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: Stage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; + protected addMissingPresetStandItemsToProfile(sessionId: string, equipmentPresetStage: IStage, pmcData: IPmcData, equipmentPresetHideoutArea: IHideoutArea, output: IItemEventRouterResponse): void; /** * Add an inventory item to profile from a hideout area stage data * @param pmcData Profile to update * @param dbHideoutArea Hideout area from db being upgraded * @param hideoutStage Stage area upgraded to */ - protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: Stage): void; + protected addUpdateInventoryItemToProfile(sessionId: string, pmcData: IPmcData, dbHideoutArea: IHideoutArea, hideoutStage: IStage): void; /** * @param output Object to send to client * @param sessionID Session/player id @@ -125,7 +125,7 @@ export declare class HideoutController { * @param hideoutDbData Hideout area that caused addition of stash * @param hideoutStage Hideout area upgraded to this */ - protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: Stage, output: IItemEventRouterResponse): void; + protected addContainerUpgradeToClientOutput(sessionID: string, areaType: HideoutAreas, hideoutDbData: IHideoutArea, hideoutStage: IStage, output: IItemEventRouterResponse): void; /** * Handle HideoutPutItemsInAreaSlots * Create item in hideout slot item array, remove item from player inventory @@ -252,6 +252,12 @@ export declare class HideoutController { * @param request QTE result object */ handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void; + /** + * Apply mild/severe muscle pain after gym use + * @param pmcData Profile to apply effect to + * @param finishEffect Effect data to apply after completing QTE gym event + */ + protected handleMusclePain(pmcData: IPmcData, finishEffect: IQteResult): void; /** * Record a high score from the shooting range into a player profiles overallcounters * @param sessionId Session id diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index 2f45da6..2701622 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -9,7 +9,7 @@ import { IGetInsuranceCostRequestData } from "@spt/models/eft/insurance/IGetInsu import { IGetInsuranceCostResponseData } from "@spt/models/eft/insurance/IGetInsuranceCostResponseData"; import { IInsureRequestData } from "@spt/models/eft/insurance/IInsureRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { Insurance } from "@spt/models/eft/profile/ISptProfile"; +import { IInsurance } from "@spt/models/eft/profile/ISptProfile"; import { IInsuranceConfig } from "@spt/models/spt/config/IInsuranceConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; @@ -68,7 +68,7 @@ export declare class InsuranceController { * @param time The time to check ready status against. Current time by default. * @returns All insured items that are ready to be processed. */ - protected filterInsuredItems(sessionID: string, time?: number): Insurance[]; + protected filterInsuredItems(sessionID: string, time?: number): IInsurance[]; /** * This method orchestrates the processing of insured items in a profile. * @@ -76,13 +76,13 @@ export declare class InsuranceController { * @param sessionID The session ID that should receive the processed items. * @returns void */ - protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void; + protected processInsuredItems(insuranceDetails: IInsurance[], sessionID: string): void; /** * Count all items in all insurance packages. * @param insurance * @returns */ - protected countAllInsuranceItems(insurance: Insurance[]): number; + protected countAllInsuranceItems(insurance: IInsurance[]): number; /** * Remove an insurance package from a profile using the package's system data information. * @@ -90,7 +90,7 @@ export declare class InsuranceController { * @param index The array index of the insurance package to remove. * @returns void */ - protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void; + protected removeInsurancePackageFromProfile(sessionID: string, insPackage: IInsurance): void; /** * Finds the items that should be deleted based on the given Insurance object. * @@ -98,7 +98,7 @@ export declare class InsuranceController { * @param insured - The insurance object containing the items to evaluate for deletion. * @returns A Set containing the IDs of items that should be deleted. */ - protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set; + protected findItemsToDelete(rootItemParentID: string, insured: IInsurance): Set; /** * Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this * context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun, @@ -109,7 +109,7 @@ export declare class InsuranceController { * @param itemsMap - A Map object for quick item look-up by item ID. * @returns A Map object containing parent item IDs to arrays of their attachment items. */ - protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map): Map; + protected populateParentAttachmentsMap(rootItemParentID: string, insured: IInsurance, itemsMap: Map): Map; /** * Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments * remain, the parent is removed from the map as well. @@ -129,7 +129,7 @@ export declare class InsuranceController { * @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items. * @returns void */ - protected processRegularItems(insured: Insurance, toDelete: Set, parentAttachmentsMap: Map): void; + protected processRegularItems(insured: IInsurance, toDelete: Set, parentAttachmentsMap: Map): void; /** * Process parent items and their attachments, updating the toDelete Set accordingly. * @@ -167,7 +167,7 @@ export declare class InsuranceController { * @param toDelete The items that should be deleted. * @returns void */ - protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void; + protected removeItemsFromInsurance(insured: IInsurance, toDelete: Set): void; /** * Handle sending the insurance message to the user that potentially contains the valid insurance items. * @@ -175,7 +175,7 @@ export declare class InsuranceController { * @param insurance The context of insurance to use. * @returns void */ - protected sendMail(sessionID: string, insurance: Insurance): void; + protected sendMail(sessionID: string, insurance: IInsurance): void; /** * Determines whether an insured item should be removed from the player's inventory based on a random roll and * trader-specific return chance. diff --git a/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts b/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts index 789fc00..3a715da 100644 --- a/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LauncherController.d.ts @@ -5,7 +5,7 @@ import { IChangeRequestData } from "@spt/models/eft/launcher/IChangeRequestData" import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData"; import { IRegisterData } from "@spt/models/eft/launcher/IRegisterData"; import { IConnectResponse } from "@spt/models/eft/profile/IConnectResponse"; -import { Info, ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails, Info } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -61,5 +61,5 @@ export declare class LauncherController { * @param sessionId Player id * @returns Array of mod details */ - getServerModsProfileUsed(sessionId: string): ModDetails[]; + getServerModsProfileUsed(sessionId: string): IModDetails[]; } diff --git a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts index 64aa20f..1321d63 100644 --- a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts @@ -1,4 +1,5 @@ import { ILocationsGenerateAllResponse } from "@spt/models/eft/common/ILocationsSourceDestinationBase"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -22,5 +23,5 @@ export declare class LocationController { */ generateAll(sessionId: string): ILocationsGenerateAllResponse; /** Handle client/airdrop/loot */ - getAirdropLoot(): IGetAirdropLootResponse; + getAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index a0fefce..7e6a34e 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -14,20 +14,18 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { LocationLifecycleService } from "@spt/services/LocationLifecycleService"; import { MatchLocationService } from "@spt/services/MatchLocationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { ICloner } from "@spt/utils/cloners/ICloner"; export declare class MatchController { protected logger: ILogger; protected saveServer: SaveServer; protected matchLocationService: MatchLocationService; protected configServer: ConfigServer; - protected profileSnapshotService: ProfileSnapshotService; protected applicationContext: ApplicationContext; protected locationLifecycleService: LocationLifecycleService; protected cloner: ICloner; protected matchConfig: IMatchConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); + constructor(logger: ILogger, saveServer: SaveServer, matchLocationService: MatchLocationService, configServer: ConfigServer, applicationContext: ApplicationContext, locationLifecycleService: LocationLifecycleService, cloner: ICloner); getEnabled(): boolean; /** Handle client/match/group/delete */ deleteGroup(info: any): void; diff --git a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts index 463ea29..978558b 100644 --- a/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RagfairController.d.ts @@ -14,7 +14,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { IAddOfferRequestData, Requirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; +import { IAddOfferRequestData, IRequirement } from "@spt/models/eft/ragfair/IAddOfferRequestData"; import { IExtendOfferRequestData } from "@spt/models/eft/ragfair/IExtendOfferRequestData"; import { IGetItemPriceResult } from "@spt/models/eft/ragfair/IGetItemPriceResult"; import { IGetMarketPriceRequestData } from "@spt/models/eft/ragfair/IGetMarketPriceRequestData"; @@ -137,10 +137,11 @@ export declare class RagfairController { update(): void; /** * Called when creating an offer on flea, fills values in top right corner - * @param getPriceRequest + * @param getPriceRequest Client request object + * @param ignoreTraderOffers Should trader offers be ignored in the calcualtion * @returns min/avg/max values for an item based on flea offers available */ - getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult; + getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData, ignoreTraderOffers?: boolean): IGetItemPriceResult; /** * List item(s) on flea for sale * @param pmcData Player profile @@ -212,7 +213,7 @@ export declare class RagfairController { * @param requirements * @returns Rouble price */ - protected calculateRequirementsPriceInRub(requirements: Requirement[]): number; + protected calculateRequirementsPriceInRub(requirements: IRequirement[]): number; /** * Using item ids from flea offer request, find corresponding items from player inventory and return as array * @param pmcData Player profile @@ -223,7 +224,7 @@ export declare class RagfairController { items: IItem[][] | undefined; errorMessage: string | undefined; }; - createPlayerOffer(sessionId: string, requirements: Requirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; + createPlayerOffer(sessionId: string, requirements: IRequirement[], items: IItem[], sellInOnePiece: boolean): IRagfairOffer; getAllFleaPrices(): Record; getStaticPrices(): Record; /** diff --git a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts index a2ce0d8..493cb8f 100644 --- a/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/WeatherController.d.ts @@ -1,17 +1,21 @@ import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { IWeatherData } from "@spt/models/eft/weather/IWeatherData"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { IGetLocalWeatherResponseData } from "@spt/models/spt/weather/IGetLocalWeatherResponseData"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { RaidWeatherService } from "@spt/services/RaidWeatherService"; import { SeasonalEventService } from "@spt/services/SeasonalEventService"; export declare class WeatherController { protected weatherGenerator: WeatherGenerator; protected logger: ILogger; protected configServer: ConfigServer; protected seasonalEventService: SeasonalEventService; + protected raidWeatherService: RaidWeatherService; + protected weatherHelper: WeatherHelper; protected weatherConfig: IWeatherConfig; - constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService); + constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer, seasonalEventService: SeasonalEventService, raidWeatherService: RaidWeatherService, weatherHelper: WeatherHelper); /** Handle client/weather */ generate(): IWeatherData; /** @@ -19,5 +23,6 @@ export declare class WeatherController { * @returns Date object */ getCurrentInRaidTime(): Date; - generateLocal(sesssionID: string): IGetLocalWeatherResponseData; + /** Handle client/localGame/weather */ + generateLocal(sesssionId: string): IGetLocalWeatherResponseData; } diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index 04639ed..c2b531c 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -16,7 +16,7 @@ import { IFilterPlateModsForSlotByLevelResult } from "@spt/models/spt/bots/IFilt import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; import { IGenerateWeaponRequest } from "@spt/models/spt/bots/IGenerateWeaponRequest"; import { IModToSpawnRequest } from "@spt/models/spt/bots/IModToSpawnRequest"; -import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; import { ExhaustableArray } from "@spt/models/spt/server/ExhaustableArray"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -56,11 +56,12 @@ export declare class BotEquipmentModGenerator { * @param equipment Equipment item to add mods to * @param modPool Mod list to choose frm * @param parentId parentid of item to add mod to - * @param parentTemplate template objet of item to add mods to + * @param parentTemplate Template object of item to add mods to + * @param specificBlacklist The relevant blacklist from bot.json equipment dictionary * @param forceSpawn should this mod be forced to spawn * @returns Item + compatible mods as an array */ - generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): IItem[]; + generateModsForEquipment(equipment: IItem[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, specificBlacklist: IEquipmentFilterDetails, shouldForceSpawn?: boolean): IItem[]; /** * Filter a bots plate pool based on its current level * @param settings Bot equipment generation settings @@ -125,13 +126,13 @@ export declare class BotEquipmentModGenerator { protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): ISlot; /** * Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot - * @param itemSlot slot the item sits in - * @param modSlot slot the mod sits in + * @param itemSlot slot the item sits in from db + * @param modSlotName Name of slot the mod sits in * @param modSpawnChances Chances for various mod spawns * @param botEquipConfig Various config settings for generating this type of bot * @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped */ - protected shouldModBeSpawned(itemSlot: ISlot, modSlot: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; + protected shouldModBeSpawned(itemSlot: ISlot, modSlotName: string, modSpawnChances: IModsChances, botEquipConfig: EquipmentFilters): ModSpawn; /** * Choose a mod to fit into the desired slot * @param request Data used to choose an appropriate mod with @@ -235,7 +236,7 @@ export declare class BotEquipmentModGenerator { * @param modPool Pool of mods we are adding to * @param botEquipBlacklist A blacklist of items that cannot be picked */ - protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: EquipmentFilterDetails): void; + protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: IMods, botEquipBlacklist: IEquipmentFilterDetails): void; /** * Get the possible items that fit a slot * @param parentItemId item tpl to get compatible items for @@ -243,7 +244,7 @@ export declare class BotEquipmentModGenerator { * @param botEquipBlacklist Equipment that should not be picked * @returns Array of compatible items for that slot */ - protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[]; + protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: IEquipmentFilterDetails): string[]; /** * Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist * @param allowedMods Base mods to filter @@ -251,7 +252,7 @@ export declare class BotEquipmentModGenerator { * @param modSlot Slot mods belong to * @returns Filtered array of mod tpls */ - protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[]; + protected filterModsByBlacklist(allowedMods: string[], botEquipBlacklist: IEquipmentFilterDetails, modSlot: string): string[]; /** * With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines. * Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0. diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index bff2b49..6f76b37 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -5,7 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; 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 { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -53,7 +53,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate bots * @returns constructed bot */ - prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase; + prepareAndGenerateBot(sessionId: string, botGenerationDetails: IBotGenerationDetails): IBotBase; /** * Get a clone of the default bot base object and adjust its role/side/difficulty values * @param botRole Role bot should have @@ -75,7 +75,7 @@ export declare class BotGenerator { * @param botGenerationDetails details on how to generate the bot * @returns IBotBase object */ - protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; protected addAdditionalPocketLootWeightsForUnheardBot(botJsonTemplate: IBotType): void; /** * Remove items from item.json/lootableItemBlacklist from bots inventory @@ -88,7 +88,7 @@ export declare class BotGenerator { * @param appearance Appearance settings to choose from * @param botGenerationDetails Generation details */ - protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: BotGenerationDetails): void; + protected setBotAppearance(bot: IBotBase, appearance: IAppearance, botGenerationDetails: IBotGenerationDetails): void; /** * Log the number of PMCs generated to the debug console * @param output Generated bot array, ready to send to client diff --git a/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts index 5c23c43..163c651 100644 --- a/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotInventoryGenerator.d.ts @@ -1,17 +1,22 @@ +import { ApplicationContext } from "@spt/context/ApplicationContext"; import { BotEquipmentModGenerator } from "@spt/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt/helpers/BotHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; +import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType, IChances, IEquipment, IGeneration, IInventory } from "@spt/models/eft/common/tables/IBotType"; +import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots"; import { IGenerateEquipmentProperties } from "@spt/models/spt/bots/IGenerateEquipmentProperties"; -import { EquipmentFilterDetails, IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; +import { BotEquipmentFilterService } from "@spt/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt/services/BotEquipmentModPoolService"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; @@ -22,18 +27,22 @@ export declare class BotInventoryGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected databaseService: DatabaseService; + protected applicationContext: ApplicationContext; protected botWeaponGenerator: BotWeaponGenerator; protected botLootGenerator: BotLootGenerator; protected botGeneratorHelper: BotGeneratorHelper; + protected profileHelper: ProfileHelper; protected botHelper: BotHelper; protected weightedRandomHelper: WeightedRandomHelper; protected itemHelper: ItemHelper; + protected weatherHelper: WeatherHelper; protected localisationService: LocalisationService; + protected botEquipmentFilterService: BotEquipmentFilterService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected botEquipmentModGenerator: BotEquipmentModGenerator; protected configServer: ConfigServer; protected botConfig: IBotConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseService: DatabaseService, applicationContext: ApplicationContext, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, profileHelper: ProfileHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, itemHelper: ItemHelper, weatherHelper: WeatherHelper, localisationService: LocalisationService, botEquipmentFilterService: BotEquipmentFilterService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer); /** * Add equipment/weapons/loot to bot * @param sessionId Session id @@ -52,6 +61,7 @@ export declare class BotInventoryGenerator { protected generateInventoryBase(): PmcInventory; /** * Add equipment to a bot + * @param sessionId Session id * @param templateInventory bot/x.json data from db * @param wornItemChances Chances items will be added to bot * @param botRole Role bot has (assault/pmcBot) @@ -59,7 +69,7 @@ export declare class BotInventoryGenerator { * @param botLevel Level of bot * @param chosenGameVersion Game version for bot, only really applies for PMCs */ - protected generateAndAddEquipmentToBot(templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string): void; + protected generateAndAddEquipmentToBot(sessionId: string, templateInventory: IInventory, wornItemChances: IChances, botRole: string, botInventory: PmcInventory, botLevel: number, chosenGameVersion: string, raidConfig: IGetRaidConfigurationRequestData): void; /** * Remove non-armored rigs from parameter data * @param templateEquipment Equpiment to filter TacticalVest of @@ -75,6 +85,7 @@ export declare class BotInventoryGenerator { protected filterRigsToThoseWithoutProtection(templateEquipment: IEquipment, botRole: string, allowEmptyResult?: boolean): void; /** * Add a piece of equipment with mods to inventory from the provided pools + * @param sessionId Session id * @param settings Values to adjust how item is chosen and added to bot * @returns true when item added */ @@ -82,10 +93,10 @@ export declare class BotInventoryGenerator { /** * Get all possible mods for item and filter down based on equipment blacklist from bot.json config * @param itemTpl Item mod pool is being retrieved and filtered - * @param equipmentBlacklist blacklist to filter mod pool with + * @param equipmentBlacklist Blacklist to filter mod pool with * @returns Filtered pool of mods */ - protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record; + protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: Record): Record; /** * Work out what weapons bot should have equipped and add them to bot inventory * @param templateInventory bot/x.json data from db diff --git a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts index 855b0db..0dada8f 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts @@ -1,7 +1,7 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { MathUtil } from "@spt/utils/MathUtil"; @@ -19,7 +19,7 @@ export declare class BotLevelGenerator { * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ - generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; + generateBotLevel(levelDetails: MinMax, botGenerationDetails: IBotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; protected chooseBotLevel(min: number, max: number, shift: number, number: number): number; /** * Return the min and max bot level based on a relative delta from the PMC level @@ -28,5 +28,5 @@ export declare class BotLevelGenerator { * @param maxlevel Max level allowed * @returns A MinMax of the lowest and highest level to generate the bots */ - protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; + protected getRelativeBotLevelRange(botGenerationDetails: IBotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax; } diff --git a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts index 273e981..c5c871f 100644 --- a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts @@ -8,7 +8,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBa import { IGenerationData, IInventory, IModsChances } from "@spt/models/eft/common/tables/IBotType"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { GenerateWeaponResult } from "@spt/models/spt/bots/GenerateWeaponResult"; +import { IGenerateWeaponResult } from "@spt/models/spt/bots/IGenerateWeaponResult"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; @@ -52,7 +52,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon generated for a pmc * @returns GenerateWeaponResult object */ - generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Get a random weighted weapon from a bots pool of weapons * @param equipmentSlot Primary/secondary/holster @@ -71,7 +71,7 @@ export declare class BotWeaponGenerator { * @param isPmc Is weapon being generated for a pmc * @returns GenerateWeaponResult object */ - generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult; + generateWeaponByTpl(sessionId: string, weaponTpl: string, slotName: string, botTemplateInventory: IInventory, weaponParentId: string, modChances: IModsChances, botRole: string, isPmc: boolean, botLevel: number): IGenerateWeaponResult; /** * Insert a cartridge(s) into a weapon * Handles all chambers - patron_in_weapon, patron_in_weapon_000 etc @@ -114,14 +114,14 @@ export declare class BotWeaponGenerator { * @param inventory Inventory to add magazines to * @param botRole The bot type we're getting generating extra mags for */ - addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; + addExtraMagazinesToInventory(generatedWeaponResult: IGenerateWeaponResult, magWeights: IGenerationData, inventory: PmcInventory, botRole: string): void; /** * Add Grendaes for UBGL to bots vest and secure container * @param weaponMods Weapon array with mods * @param generatedWeaponResult result of weapon generation * @param inventory bot inventory to add grenades to */ - protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void; + protected addUbglGrenadesToBotInventory(weaponMods: IItem[], generatedWeaponResult: IGenerateWeaponResult, inventory: PmcInventory): void; /** * Add ammo to the secure container * @param stackCount How many stacks of ammo to add diff --git a/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts index 37124a0..a82f24f 100644 --- a/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts @@ -2,11 +2,12 @@ import { InventoryHelper } from "@spt/helpers/InventoryHelper"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { MinMax } from "@spt/models/common/MinMax"; import { IPreset } from "@spt/models/eft/common/IGlobals"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { ISealedAirdropContainerSettings, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IRewardDetails, ISealedAirdropContainerSettings } from "@spt/models/spt/config/IInventoryConfig"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; import { ItemFilterService } from "@spt/services/ItemFilterService"; @@ -36,7 +37,22 @@ export declare class LootGenerator { * @param options parameters to adjust how loot is generated * @returns An array of loot items */ - createRandomLoot(options: LootRequest): IItem[]; + createRandomLoot(options: ILootRequest): IItem[]; + /** + * Generate An array of items + * TODO - handle weapon presets/ammo packs + * @param forcedLootDict Dictionary of item tpls with minmax values + * @returns Array of IItem + */ + createForcedLoot(forcedLootDict: Record): IItem[]; + /** + * Get pool of items from item db that fit passed in param criteria + * @param itemTplBlacklist Prevent these items + * @param itemTypeWhitelist Only allow these items + * @param useRewardItemBlacklist Should item.json reward item config be used + * @param allowBossItems Should boss items be allowed in result + * @returns results of filtering + blacklist used + */ protected getItemRewardPool(itemTplBlacklist: string[], itemTypeWhitelist: string[], useRewardItemBlacklist: boolean, allowBossItems: boolean): { itemPool: [string, ITemplateItem][]; blacklist: Set; @@ -47,7 +63,7 @@ export declare class LootGenerator { * @param options Loot request options - armor level etc * @returns True if item has desired armor level */ - protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean; + protected isArmorOfDesiredProtectionLevel(armor: IPreset, options: ILootRequest): boolean; /** * Construct item limit record to hold max and current item count for each item type * @param limits limits as defined in config @@ -65,14 +81,14 @@ export declare class LootGenerator { protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record, options: LootRequest, result: IItem[]): boolean; + }>, options: ILootRequest, result: IItem[]): boolean; /** * Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values * @param item item to get stack count of * @param options loot options * @returns stack count */ - protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number; + protected getRandomisedStackCount(item: ITemplateItem, options: ILootRequest): number; /** * Find a random item in items.json and add to result array * @param presetPool Presets to choose from @@ -111,12 +127,12 @@ export declare class LootGenerator { * @param rewardContainerDetails * @returns Array of item with children arrays */ - getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): IItem[][]; + getRandomLootContainerLoot(rewardContainerDetails: IRewardDetails): IItem[][]; /** * Pick a reward item based on the reward details data * @param rewardContainerDetails * @returns Single tpl */ - protected pickRewardItem(rewardContainerDetails: RewardDetails): string; + protected pickRewardItem(rewardContainerDetails: IRewardDetails): string; } export {}; diff --git a/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts index 8625529..7a8e0e7 100644 --- a/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts @@ -6,7 +6,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotBase, ISkills, IStats } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { IPlayerScavConfig, KarmaLevel } from "@spt/models/spt/config/IPlayerScavConfig"; +import { IKarmaLevel, IPlayerScavConfig } from "@spt/models/spt/config/IPlayerScavConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -67,7 +67,7 @@ export declare class PlayerScavGenerator { * @param karmaSettings Values to modify the bot template with * @param baseBotNode bot template to modify according to karama level settings */ - protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: KarmaLevel, baseBotNode: IBotType): void; + protected adjustBotTemplateWithKarmaSpecificSettings(karmaSettings: IKarmaLevel, baseBotNode: IBotType): void; protected getScavSkills(scavProfile: IPmcData): ISkills; protected getDefaultScavSkills(): ISkills; protected getScavStats(scavProfile: IPmcData): IStats; diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index 02e5cea..3c88984 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -9,8 +9,10 @@ import { RagfairServerHelper } from "@spt/helpers/RagfairServerHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBarterScheme } from "@spt/models/eft/common/tables/ITrader"; -import { IRagfairOffer, IRagfairOfferUser, OfferRequirement } from "@spt/models/eft/ragfair/IRagfairOffer"; -import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { IOfferRequirement, IRagfairOffer, IRagfairOfferUser } from "@spt/models/eft/ragfair/IRagfairOffer"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; +import { IArmorPlateBlacklistSettings, IBarterDetails, IDynamic, IRagfairConfig } from "@spt/models/spt/config/IRagfairConfig"; +import { ITplWithFleaPrice } from "@spt/models/spt/ragfair/ITplWithFleaPrice"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -45,6 +47,7 @@ export declare class RagfairOfferGenerator { protected configServer: ConfigServer; protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; + protected botConfig: IBotConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; @@ -86,7 +89,7 @@ export declare class RagfairOfferGenerator { * @param offerRequirements barter requirements for offer * @returns rouble cost of offer */ - protected convertOfferRequirementsIntoRoubles(offerRequirements: OfferRequirement[]): number; + protected convertOfferRequirementsIntoRoubles(offerRequirements: IOfferRequirement[]): number; /** * Get avatar url from trader table in db * @param isTrader Is user we're getting avatar for a trader @@ -136,7 +139,7 @@ export declare class RagfairOfferGenerator { * @param isExpiredOffer is an expired offer * @param config Ragfair dynamic config */ - protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: Dynamic): Promise; + protected createOffersFromAssort(assortItemWithChildren: IItem[], isExpiredOffer: boolean, config: IDynamic): Promise; /** * iterate over an items chidren and look for plates above desired level and remove them * @param presetWithChildren preset to check for plates @@ -203,17 +206,15 @@ export declare class RagfairOfferGenerator { /** * Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based * @param offerItems Items for sale in offer + * @param barterConfig Barter config from ragfairConfig.dynamic.barter * @returns Barter scheme */ - protected createBarterBarterScheme(offerItems: IItem[]): IBarterScheme[]; + protected createBarterBarterScheme(offerItems: IItem[], barterConfig: IBarterDetails): IBarterScheme[]; /** * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { - tpl: string; - price: number; - }[]; + protected getFleaPricesAsArray(): ITplWithFleaPrice[]; /** * Create a random currency-based barter scheme for an array of items * @param offerWithChildren Items on offer diff --git a/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts index 17f4fd4..bc78cca 100644 --- a/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -33,26 +33,30 @@ export declare class RepeatableQuestRewardGenerator { protected questConfig: IQuestConfig; constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, cloner: ICloner); /** - * Generate the reward for a mission. A reward can consist of + * Generate the reward for a mission. A reward can consist of: * - Experience * - Money + * - GP coins + * - Weapon preset * - Items * - Trader Reputation + * - Skill level experience * * The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to * experience / money / items / trader reputation can be defined in QuestConfig.js * - * There's also a random variation of the reward the spread of which can be also defined in the config. + * There's also a random variation of the reward the spread of which can be also defined in the config * * Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used - * - * @param {integer} pmcLevel player's level - * @param {number} difficulty a reward scaling factor from 0.2 to 1 - * @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader) - * @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest - * @returns {object} object of "Reward"-type that can be given for a repeatable mission + * @param pmcLevel Level of player reward is being generated for + * @param difficulty Reward scaling factor from 0.2 to 1 + * @param traderId Trader reward will be given by + * @param repeatableConfig Config for quest type (daily, weekly) + * @param questConfig + * @param rewardTplBlacklist OPTIONAL: list of tpls to NOT use when picking a reward + * @returns IQuestRewards */ - generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards; + generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig, rewardTplBlacklist?: string[]): IQuestRewards; protected getQuestRewardValues(rewardScaling: IRewardScaling, difficulty: number, pmcLevel: number): IQuestRewardValues; /** * Get an array of items + stack size to give to player as reward that fit inside of a rouble budget diff --git a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts index 194b705..28ec2b6 100644 --- a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts @@ -4,7 +4,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IHideoutScavCase } from "@spt/models/eft/hideout/IHideoutScavCase"; import { IScavCaseConfig } from "@spt/models/spt/config/IScavCaseConfig"; -import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; +import { IRewardCountAndPriceDetails, IScavCaseRewardCountsAndPrices } from "@spt/models/spt/hideout/ScavCaseRewardCountsAndPrices"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -48,7 +48,7 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters how the rewards should be filtered down (by item count) * @returns */ - protected pickRandomRewards(items: ITemplateItem[], itemFilters: RewardCountAndPriceDetails, rarity: string): ITemplateItem[]; + protected pickRandomRewards(items: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails, rarity: string): ITemplateItem[]; /** * Choose if money should be a reward based on the moneyRewardChancePercent config chance in scavCaseConfig * @returns true if reward should be money @@ -81,13 +81,13 @@ export declare class ScavCaseRewardGenerator { * @param itemFilters controls how the dbItems will be filtered and returned (handbook price) * @returns filtered dbItems array */ - protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: RewardCountAndPriceDetails): ITemplateItem[]; + protected getFilteredItemsByPrice(dbItems: ITemplateItem[], itemFilters: IRewardCountAndPriceDetails): ITemplateItem[]; /** * Gathers the reward min and max count params for each reward quality level from config and scavcase.json into a single object * @param scavCaseDetails scavcase.json values * @returns ScavCaseRewardCountsAndPrices object */ - protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): ScavCaseRewardCountsAndPrices; + protected getScavCaseRewardCountsAndPrices(scavCaseDetails: IHideoutScavCase): IScavCaseRewardCountsAndPrices; /** * Randomises the size of ammo and money stacks * @param itemToCalculate ammo or money item diff --git a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts index c9ca02a..476f29c 100644 --- a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts @@ -1,6 +1,8 @@ import { ApplicationContext } from "@spt/context/ApplicationContext"; +import { WeatherHelper } from "@spt/helpers/WeatherHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IWeather, IWeatherData } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; import { WindDirection } from "@spt/models/enums/WindDirection"; import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -10,6 +12,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; export declare class WeatherGenerator { protected weightedRandomHelper: WeightedRandomHelper; + protected weatherHelper: WeatherHelper; protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -18,7 +21,7 @@ export declare class WeatherGenerator { protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, weatherHelper: WeatherHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); /** * Get current + raid datetime and format into correct BSG format and return * @param data Weather data @@ -32,12 +35,6 @@ export declare class WeatherGenerator { * @returns formatted time */ protected getBsgFormattedInRaidTime(): string; - /** - * Get the current in-raid time - * @param currentDate (new Date()) - * @returns Date object of current in-raid time - */ - getInRaidTime(): Date; /** * Get current time formatted to fit BSGs requirement * @param date date to format into bsg style @@ -46,14 +43,24 @@ export declare class WeatherGenerator { protected getBSGFormattedTime(date: Date): string; /** * Return randomised Weather data with help of config/weather.json + * @param currentSeason the currently active season + * @param timestamp OPTIONAL what timestamp to generate the weather data at, defaults to now when not supplied * @returns Randomised weather data */ - generateWeather(): IWeather; + generateWeather(currentSeason: Season, timestamp?: number): IWeather; + /** + * Choose a temprature for the raid based on time of day and current season + * @param currentSeason What season tarkov is currently in + * @param inRaidTimestamp What time is the raid running at + * @returns Timestamp + */ + protected getRaidTemperature(currentSeason: Season, inRaidTimestamp: number): number; /** * Set IWeather date/time/timestamp values to now * @param weather Object to update + * @param timestamp OPTIONAL, define timestamp used */ - protected setCurrentDateTime(weather: IWeather): void; + protected setCurrentDateTime(weather: IWeather, timestamp?: number): void; protected getWeightedWindDirection(): WindDirection; protected getWeightedClouds(): number; protected getWeightedWindSpeed(): number; diff --git a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts index 1058942..7dc9b59 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts @@ -1,6 +1,6 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBotType, IDifficultyCategories } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IBotConfig, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -54,7 +54,7 @@ export declare class BotHelper { * @param botEquipConfig bot equipment json * @returns RandomisationDetails */ - getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails | undefined; + getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): IRandomisationDetails | undefined; /** * Choose between pmcBEAR and pmcUSEC at random based on the % defined in pmcConfig.isUsec * @returns pmc role @@ -71,5 +71,11 @@ export declare class BotHelper { * @returns pmc side as string */ protected getRandomizedPmcSide(): string; - getPmcNicknameOfMaxLength(userId: string, maxLength: number): string; + /** + * Get a name from a PMC that fits the desired length + * @param maxLength Max length of name, inclusive + * @param side OPTIONAL - what side PMC to get name from (usec/bear) + * @returns name of PMC + */ + getPmcNicknameOfMaxLength(maxLength: number, side?: string): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts index 4f0a2cb..7e1f9db 100644 --- a/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/DialogueHelper.d.ts @@ -2,7 +2,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, MessagePreview } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessagePreview } from "@spt/models/eft/profile/ISptProfile"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -23,7 +23,7 @@ export declare class DialogueHelper { * @param dialogue * @returns MessagePreview */ - getMessagePreview(dialogue: Dialogue): MessagePreview; + getMessagePreview(dialogue: IDialogue): IMessagePreview; /** * Get the item contents for a particular message. * @param messageID @@ -37,5 +37,5 @@ export declare class DialogueHelper { * @param sessionId Session/player id * @returns Dialog dictionary */ - getDialogsForProfile(sessionId: string): Record; + getDialogsForProfile(sessionId: string): Record; } diff --git a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts index 73ce2b8..b05d008 100644 --- a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts @@ -1,7 +1,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBodyPartsHealth, IHealth } from "@spt/models/eft/common/tables/IBotBase"; import { ISyncHealthRequestData } from "@spt/models/eft/health/ISyncHealthRequestData"; -import { Effects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IEffects, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IHealthConfig } from "@spt/models/spt/config/IHealthConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -63,7 +63,7 @@ export declare class HealthHelper { * @param bodyPartsWithEffects dict of body parts with effects that should be added to profile * @param addEffects Should effects be added back to profile */ - protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void; + protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: IEffects, deleteExistingEffects?: boolean): void; /** * Add effect to body part in profile * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts index 5917927..21672c6 100644 --- a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts @@ -4,12 +4,13 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBotHideoutArea, IHideoutImprovement, IProduction, IProductive } from "@spt/models/eft/common/tables/IBotBase"; import { IItem, IUpd } from "@spt/models/eft/common/tables/IItem"; -import { IHideoutArea, StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IHideoutArea, IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData"; import { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction"; import { IHideoutSingleProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutSingleProductionStartRequestData"; import { IHideoutTakeProductionRequestData } from "@spt/models/eft/hideout/IHideoutTakeProductionRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; +import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,7 +56,7 @@ export declare class HideoutHelper { * This convenience function initializes new Production Object * with all the constants. */ - initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean, isCultistCircle?: boolean): IProduction; + initProduction(recipeId: string, productionTime: number, needFuelForAllProductionTime: boolean): IProduction; /** * Is the provided object a Production type * @param productive @@ -67,7 +68,7 @@ export declare class HideoutHelper { * @param pmcData Profile to add bonus to * @param bonus Bonus to add to profile */ - applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: StageBonus): void; + applyPlayerUpgradesBonuses(pmcData: IPmcData, bonus: IStageBonus): void; /** * Process a players hideout, update areas that use resources + increment production timers * @param sessionID Session id @@ -94,6 +95,21 @@ export declare class HideoutHelper { isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }): void; + /** + * Is a craft from a particular hideout area + * @param craft Craft to check + * @param hideoutType Type to check craft against + * @returns True it is from that area + */ + protected isCraftOfType(craft: IProduction, hideoutType: HideoutAreas): boolean; + /** + * Has the craft completed + * Ignores bitcoin farm/cultist circle as they're continuous crafts + * @param craft Craft to check + + * @returns True when craft is compelte + */ + protected isCraftComplete(craft: IProduction): boolean; /** * Update progress timer for water collector * @param pmcData profile to update diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index 10b40d9..11b4043 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -39,7 +39,7 @@ export declare class InRaidHelper { * @param serverProfile Profile to update * @param postRaidProfile Profile returned by client after a raid */ - setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean): void; + setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData, isSurvived: boolean, isTransfer: boolean): void; /** * Iterate over inventory items and remove the property that defines an item as Found in Raid * Only removes property if item had FiR when entering raid diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index e95f340..c6bc6fe 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -16,7 +16,7 @@ import { IInventoryRemoveRequestData } from "@spt/models/eft/inventory/IInventor import { IInventorySplitRequestData } from "@spt/models/eft/inventory/IInventorySplitRequestData"; import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { IInventoryConfig, RewardDetails } from "@spt/models/spt/config/IInventoryConfig"; +import { IInventoryConfig, IRewardDetails } from "@spt/models/spt/config/IInventoryConfig"; import { IOwnerInventoryItems } from "@spt/models/spt/inventory/IOwnerInventoryItems"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -246,7 +246,7 @@ export declare class InventoryHelper { * @param itemTpl Container being opened * @returns Reward details */ - getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails; + getRandomLootContainerRewardDetails(itemTpl: string): IRewardDetails; getInventoryConfig(): IInventoryConfig; /** * Recursively checks if the given item is diff --git a/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts index 3a74563..80beb77 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts @@ -1,4 +1,4 @@ -import { Dialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt/models/enums/MessageType"; import { SaveServer } from "@spt/servers/SaveServer"; @@ -32,5 +32,5 @@ export declare class NotificationSendHelper { * @param senderDetails Who is sending the message * @returns Dialogue */ - protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue; + protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): IDialogue; } diff --git a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts index b947f1b..2732631 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts @@ -1,5 +1,5 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { Message, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; @@ -17,12 +17,12 @@ export declare class NotifierHelper { * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; + createRagfairOfferSoldNotification(dialogueMessage: IMessage, ragfairData: IMessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; + createNewMessageNotification(dialogueMessage: IMessage): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts index df468fe..e36a349 100644 --- a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts @@ -11,7 +11,6 @@ import { ConfigServer } from "@spt/servers/ConfigServer"; import { SaveServer } from "@spt/servers/SaveServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; -import { ProfileSnapshotService } from "@spt/services/ProfileSnapshotService"; import { HashUtil } from "@spt/utils/HashUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { Watermark } from "@spt/utils/Watermark"; @@ -24,12 +23,11 @@ export declare class ProfileHelper { protected saveServer: SaveServer; protected databaseService: DatabaseService; protected itemHelper: ItemHelper; - protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id @@ -47,19 +45,6 @@ export declare class ProfileHelper { * @returns Array of IPmcData objects */ getCompleteProfile(sessionId: string): IPmcData[]; - /** - * Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen - * Server saves the post-raid changes prior to the xp screen getting the profile, this results in the xp screen using - * the now updated profile values as a base, meaning it shows x2 xp gained - * Instead, clone the post-raid profile (so we dont alter its values), apply the pre-raid xp values to the cloned objects and return - * Delete snapshot of pre-raid profile prior to returning profile data - * @param sessionId Session id - * @param output pmc and scav profiles array - * @param pmcProfile post-raid pmc profile - * @param scavProfile post-raid scav profile - * @returns Updated profile array - */ - protected postRaidXpWorkaroundFix(sessionId: string, clonedPmc: IPmcData, clonedScav: IPmcData, output: IPmcData[]): IPmcData[]; /** * Sanitize any information from the profile that the client does not expect to receive * @param clonedProfile A clone of the full player profile diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts index f5a2193..66a146d 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts @@ -15,6 +15,7 @@ import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRo import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData } from "@spt/models/eft/ragfair/ISearchRequestData"; +import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IQuestConfig } from "@spt/models/spt/config/IQuestConfig"; import { IRagfairConfig, ITieredFlea } from "@spt/models/spt/config/IRagfairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -55,6 +56,7 @@ export declare class RagfairOfferHelper { protected static goodSoldTemplate: string; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; + protected botConfig: IBotConfig; constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, botHelper: BotHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer); /** * Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see @@ -65,7 +67,7 @@ export declare class RagfairOfferHelper { * @returns Offers the player should see */ getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; - protected offerIsHiddenFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): boolean; + protected checkAndLockOfferFromPlayerTieredFlea(tieredFlea: ITieredFlea, offer: IRagfairOffer, tieredFleaLimitTypes: string[], playerLevel: number): void; /** * Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level * @param searchRequest Search request from client diff --git a/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts index 538347e..67da4ef 100644 --- a/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -42,5 +42,5 @@ export declare class RepairHelper { * @param traderQualityMultipler Different traders produce different loss values * @returns Amount to reduce max durability by */ - protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; + protected getRandomisedWeaponRepairDegradationValue(itemProps: IProps, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number; } diff --git a/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts new file mode 100644 index 0000000..928017f --- /dev/null +++ b/TypeScript/9RouterHooks/types/helpers/WeatherHelper.d.ts @@ -0,0 +1,25 @@ +import { DateTime } from "@spt/models/enums/DateTime"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class WeatherHelper { + protected logger: ILogger; + protected timeUtil: TimeUtil; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + constructor(logger: ILogger, timeUtil: TimeUtil, configServer: ConfigServer); + /** + * Get the current in-raid time + * @param currentDate (new Date()) + * @returns Date object of current in-raid time + */ + getInRaidTime(timestamp?: number): Date; + /** + * Is the current raid at nighttime + * @param timeVariant PASS OR CURR (from raid settings) + * @returns True when nighttime + */ + isNightTime(timeVariant: DateTime): boolean; + isHourAtNightTime(currentHour: number): boolean; +} diff --git a/TypeScript/9RouterHooks/types/loaders/PreSptModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/PreSptModLoader.d.ts index 8814525..e8166f1 100644 --- a/TypeScript/9RouterHooks/types/loaders/PreSptModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/PreSptModLoader.d.ts @@ -1,6 +1,6 @@ import { ModLoadOrder } from "@spt/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt/loaders/ModTypeCheck"; -import { ModDetails } from "@spt/models/eft/profile/ISptProfile"; +import { IModDetails } from "@spt/models/eft/profile/ISptProfile"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { IModLoader } from "@spt/models/spt/mod/IModLoader"; import { IPackageJsonData } from "@spt/models/spt/mod/IPackageJsonData"; @@ -36,7 +36,7 @@ export declare class PreSptModLoader implements IModLoader { */ getImportedModsNames(): string[]; getImportedModDetails(): Record; - getProfileModsGroupedByModName(profileMods: ModDetails[]): ModDetails[]; + getProfileModsGroupedByModName(profileMods: IModDetails[]): IModDetails[]; getModPath(mod: string): string; protected importModsAsync(): Promise; protected sortMods(prev: string, next: string, missingFromOrderJSON: Record): number; 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 4def148..307277c 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -299,7 +299,7 @@ export interface IInsuredItem { itemId: string; } export interface IHideout { - Production: Record; + Production: Record; Areas: IBotHideoutArea[]; Improvements: Record; HideoutCounters: IHideoutCounters; @@ -347,8 +347,8 @@ export interface IProductive { } export interface IProduction extends IProductive { RecipeId: string; - SkipTime: number; - ProductionTime: number; + SkipTime?: number; + ProductionTime?: number; } export interface IScavCase extends IProductive { RecipeId: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts index 97dc708..abf82d9 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ICustomizationItem.d.ts @@ -4,10 +4,10 @@ export interface ICustomizationItem { _name: string; _parent: string; _type: string; - _props: Props; + _props: IProps; _proto: string; } -export interface Props { +export interface IProps { Name: string; ShortName: string; Description: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts index a1c9c11..0eb800a 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IProfileTemplate.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; -import { Dialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IUserBuilds } from "@spt/models/eft/profile/ISptProfile"; export interface IProfileTemplates { Standard: IProfileSides; "Left Behind": IProfileSides; @@ -19,7 +19,7 @@ export interface IProfileSides { export interface ITemplateSide { character: IPmcData; suits: string[]; - dialogues: Record; + dialogues: Record; userbuilds: IUserBuilds; trader: IProfileTraderTemplate; } diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts index 543a2a9..e956856 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IQuest.d.ts @@ -17,21 +17,19 @@ export interface IQuest { image: string; type: QuestTypeEnum; isKey: boolean; - /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; restartable: boolean; instantComplete: boolean; secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +37,10 @@ export interface IQuest { sptStatus?: QuestStatus; } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } export interface IQuestCondition { @@ -53,9 +51,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -64,10 +62,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -82,7 +80,7 @@ export interface IQuestConditionCounter { } export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; completeInSeconds?: number; energy?: IValueCompare; @@ -90,7 +88,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -128,7 +126,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; } export interface IQuestRewards { @@ -152,4 +150,8 @@ export interface IQuestReward { traderId?: string; unknown?: boolean; findInRaid?: boolean; + /** Game editions whitelisted to get reward */ + availableInGameEditions?: string[]; + /** Game editions blacklisted from getting reward */ + notAvailableInGameEditions?: string[]; } diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts index 145e013..41b4d1d 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts @@ -4,11 +4,11 @@ export interface ITemplateItem { _name: string; _parent: string; _type: ItemType; - _props: Props; + _props: IProps; _proto?: string; } -export interface Props { - AllowSpawnOnLocations?: any[]; +export interface IProps { + AllowSpawnOnLocations?: string[]; BeltMagazineRefreshCount?: number; ChangePriceCoef?: number; FixedPrice?: boolean; @@ -175,7 +175,7 @@ export interface Props { spawnRarity?: string; minCountSpawn?: number; maxCountSpawn?: number; - openedByKeyID?: any[]; + openedByKeyID?: string[]; RigLayoutName?: string; MaxDurability?: number; armorZone?: string[]; diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts index 9bcfead..845d92c 100644 --- a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetAllAttachmentsResponse.d.ts @@ -1,6 +1,6 @@ -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; + messages: IMessage[]; profiles: any[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts index ba28910..0eaacf8 100644 --- a/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IGetMailDialogViewResponseData.d.ts @@ -1,6 +1,6 @@ -import { IUserDialogInfo, Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IGetMailDialogViewResponseData { - messages: Message[]; + messages: IMessage[]; profiles: IUserDialogInfo[]; hasMessagesWithRewards: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/eft/game/IVersionValidateRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/IVersionValidateRequestData.d.ts index 0aa0fed..18213d9 100644 --- a/TypeScript/9RouterHooks/types/models/eft/game/IVersionValidateRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/game/IVersionValidateRequestData.d.ts @@ -1,8 +1,8 @@ export interface IVersionValidateRequestData { - version: Version; + version: IVersion; develop: boolean; } -export interface Version { +export interface IVersion { major: string; minor: string; game: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts b/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts index ba629d2..d958b74 100644 --- a/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/health/IWorkoutData.d.ts @@ -1,4 +1,36 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: IWorkoutSkills; + effects: IWorkoutEffects; +} +export interface IWorkoutSkills { + Common: IWorkoutSkillCommon[]; + Mastering: any[]; + Bonuses: any; + Points: number; +} +export interface IWorkoutSkillCommon { + Id: string; + Progress: number; + PointsEarnedDuringSession: number; + LastAccess: number; +} +export interface IWorkoutEffects { + Effects: IWorkoutEffectsParts; + Hydration: number; + Energy: number; +} +export interface IWorkoutEffectsParts { + Head: IWorkoutBodyPart; + Chest: IWorkoutBodyPart; + Stomach: IWorkoutBodyPart; + LeftArm: IWorkoutBodyPart; + RightArm: IWorkoutBodyPart; + LeftLeg: IWorkoutBodyPart; + RightLeg: IWorkoutBodyPart; + Common: IWorkoutBodyPart; +} +export interface IWorkoutBodyPart { + Regeneration: number; + Fracture: number; + MildMusclePain: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts deleted file mode 100644 index 8583e8d..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/HideoutUpgradeCompleteRequestData.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutArea.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutArea.d.ts index 0159c1d..ce4d779 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutArea.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutArea.d.ts @@ -12,16 +12,16 @@ export interface IHideoutArea { displayLevel: boolean; enableAreaRequirements: boolean; parentArea?: string; - stages: Record; + stages: Record; } export interface IAreaRequirement { areaType: number; requiredlevel: number; type: string; } -export interface Stage { +export interface IStage { autoUpgrade: boolean; - bonuses: StageBonus[]; + bonuses: IStageBonus[]; constructionTime: number; /** Containers inventory tpl */ container?: string; @@ -63,7 +63,7 @@ export interface IStageRequirement extends IRequirementBase { skillName?: string; skillLevel?: number; } -export interface StageBonus { +export interface IStageBonus { value: number; passive: boolean; production: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts index 7e927bf..f963c13 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutImproveAreaRequestData.d.ts @@ -3,10 +3,10 @@ export interface IHideoutImproveAreaRequestData { /** Hideout area id from areas.json */ id: string; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { /** Hideout inventory id that was used by improvement action */ id: string; count: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts index a773daa..1926311 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutProduction.d.ts @@ -7,7 +7,7 @@ export interface IHideoutProductionData { export interface IHideoutProduction { _id: string; areaType: number; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; /** Tpl of item being crafted */ endProduct: string; @@ -18,7 +18,7 @@ export interface IHideoutProduction { count: number; productionLimitCount: number; } -export interface Requirement extends IRequirementBase { +export interface IRequirement extends IRequirementBase { templateId?: string; count?: number; isEncoded?: boolean; @@ -33,7 +33,7 @@ export interface IRequirementBase { } export type IScavRecipe = { _id: string; - requirements: Requirement[]; + requirements: IRequirement[]; productionTime: number; endProducts: IEndProducts; }; diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts index d081d42..b420d2d 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCase.d.ts @@ -2,16 +2,16 @@ import { MinMax } from "@spt/models/common/MinMax"; export interface IHideoutScavCase { _id: string; ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + Requirements: IRequirement[]; + EndProducts: IEndProducts; } -export interface Requirement { +export interface IRequirement { templateId: string; count: number; isFunctional: boolean; type: string; } -export interface EndProducts { +export interface IEndProducts { Common: MinMax; Rare: MinMax; Superrare: MinMax; diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts index 72fda86..198d778 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutScavCaseStartRequestData.d.ts @@ -1,15 +1,15 @@ export interface IHideoutScavCaseStartRequestData { Action: "HideoutScavCaseProductionStart"; recipeId: string; - items: HideoutItem[]; - tools: Tool[]; + items: IHideoutItem[]; + tools: ITool[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { id: string; count: number; } -export interface Tool { +export interface ITool { id: string; count: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts index dfbfdca..59b6141 100644 --- a/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/hideout/IHideoutUpgradeRequestData.d.ts @@ -1,10 +1,10 @@ export interface IHideoutUpgradeRequestData { Action: "HideoutUpgrade"; areaType: number; - items: HideoutItem[]; + items: IHideoutItem[]; timestamp: number; } -export interface HideoutItem { +export interface IHideoutItem { count: number; id: string; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryAddRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryAddRequestData.d.ts index 63c5389..e1ac7ec 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryAddRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryAddRequestData.d.ts @@ -1,6 +1,6 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { Action: "Add"; item: string; - container: Container; + container: IContainer; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts index b133bff..64b1a3e 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryBaseActionRequestData.d.ts @@ -2,18 +2,18 @@ import { IBaseInteractionRequestData } from "@spt/models/eft/common/request/IBas import { IItemLocation } from "@spt/models/eft/common/tables/IItem"; export interface IInventoryBaseActionRequestData extends IBaseInteractionRequestData { } -export interface To { +export interface ITo { id: string; container: string; location?: IItemLocation | number; isSearched?: boolean; } -export interface Container { +export interface IContainer { id: string; container: string; - location?: Location | number; + location?: ILocation | number; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts index 1469136..11d6ebd 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryCreateMarkerRequestData.d.ts @@ -2,9 +2,9 @@ import { IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInve export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { Action: "CreateMapMarker"; item: string; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts index 87dcf86..9d7c675 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryEditMarkerRequestData.d.ts @@ -4,9 +4,9 @@ export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionReq item: string; X: number; Y: number; - mapMarker: MapMarker; + mapMarker: IMapMarker; } -export interface MapMarker { +export interface IMapMarker { Type: string; X: number; Y: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryMoveRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryMoveRequestData.d.ts index afb6fd0..e5c2a8b 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryMoveRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventoryMoveRequestData.d.ts @@ -1,6 +1,6 @@ -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { Action: "Move"; item: string; - to: To; + to: ITo; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySplitRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySplitRequestData.d.ts index a4bb8a4..5667f0a 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySplitRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySplitRequestData.d.ts @@ -1,4 +1,4 @@ -import { Container, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IContainer, IInventoryBaseActionRequestData } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { Action: "Split"; /** Id of item to split */ @@ -6,6 +6,6 @@ export interface IInventorySplitRequestData extends IInventoryBaseActionRequestD /** Id of new item stack */ newItem: string; /** Destination new item will be placed in */ - container: Container; + container: IContainer; count: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySwapRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySwapRequestData.d.ts index ccf4796..abd3adb 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySwapRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IInventorySwapRequestData.d.ts @@ -1,11 +1,11 @@ import { OwnerInfo } from "@spt/models/eft/common/request/IBaseInteractionRequestData"; -import { IInventoryBaseActionRequestData, To } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; +import { IInventoryBaseActionRequestData, ITo } from "@spt/models/eft/inventory/IInventoryBaseActionRequestData"; export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { Action: "Swap"; item: string; - to: To; + to: ITo; item2: string; - to2: To; + to2: ITo; fromOwner2: OwnerInfo; toOwner2: OwnerInfo; } diff --git a/TypeScript/9RouterHooks/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts index c9b97e0..f9bc284 100644 --- a/TypeScript/9RouterHooks/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts @@ -3,9 +3,9 @@ export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActio Action: "OpenRandomLootContainer"; /** Container item id being opened */ item: string; - to: To[]; + to: ITo[]; } -export interface To { +export interface ITo { /** Player character (pmc/scav) id items will be sent to */ id: string; } diff --git a/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts index 9d8a740..b66fc03 100644 --- a/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterBase.d.ts @@ -28,7 +28,7 @@ export interface IProfileChange { improvements: Record; skills: ISkills; health: IHealth; - traderRelations: Record; + traderRelations: Record; moneyTransferLimitData: IMoneyTransferLimits; repeatableQuests?: IPmcDataRepeatableQuest[]; recipeUnlocked: Record; @@ -60,7 +60,7 @@ export interface IItemChanges { del: IProduct[]; } /** Related to TraderInfo */ -export interface TraderData { +export interface ITraderData { salesSum: number; standing: number; loyalty: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts index 515b49a..5b39fb4 100644 --- a/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/itemEvent/IItemEventRouterRequest.d.ts @@ -1,19 +1,19 @@ export interface IItemEventRouterRequest { - data: Daum[]; + data: IDaum[]; tm: number; reload: number; } -export interface Daum { +export interface IDaum { Action: string; item: string; - to: To; + to: ITo; } -export interface To { +export interface ITo { id: string; container: string; - location?: Location; + location?: ILocation; } -export interface Location { +export interface ILocation { x: number; y: number; r: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/launcher/IMiniProfile.d.ts b/TypeScript/9RouterHooks/types/models/eft/launcher/IMiniProfile.d.ts index 0ea2793..856920f 100644 --- a/TypeScript/9RouterHooks/types/models/eft/launcher/IMiniProfile.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/launcher/IMiniProfile.d.ts @@ -1,4 +1,4 @@ -import { Spt } from "../profile/ISptProfile"; +import { ISpt } from "../profile/ISptProfile"; export interface IMiniProfile { username: string; nickname: string; @@ -10,5 +10,5 @@ export interface IMiniProfile { maxlvl: number; edition: string; profileId: string; - sptData: Spt; + sptData: ISpt; } diff --git a/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts index cacc805..963e43c 100644 --- a/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/location/IAirdropLootResult.d.ts @@ -1,5 +1,5 @@ -import { LootItem } from "@spt/models/spt/services/LootItem"; +import { ILootItem } from "@spt/models/spt/services/LootItem"; export interface IAirdropLootResult { dropType: string; - loot: LootItem[]; + loot: ILootItem[]; } diff --git a/TypeScript/9RouterHooks/types/models/eft/location/IGetAirdropLootRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/location/IGetAirdropLootRequest.d.ts new file mode 100644 index 0000000..c8a9cc9 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/location/IGetAirdropLootRequest.d.ts @@ -0,0 +1,3 @@ +export interface IGetAirdropLootRequest { + containerId: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts index 7f37b20..08e3c12 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IEndLocalRaidRequestData.d.ts @@ -13,6 +13,7 @@ export interface IEndLocalRaidRequestData { } export interface IEndRaidResult { profile: IPmcData; + /** "Survived/Transit etc" */ result: string; ExitStatus: ExitStatus; killerId: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts index 2e4587b..a4b7450 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts @@ -15,15 +15,15 @@ export interface IRaidSettings { isLocationTransition: boolean; timeVariant: DateTime; metabolismDisabled: boolean; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; + timeAndWeatherSettings: ITimeAndWeatherSettings; + botSettings: IBotSettings; + wavesSettings: IWavesSettings; side: SideType; raidMode: RaidMode; playersSpawnPlace: PlayersSpawnPlace; CanShowGroupPreview: boolean; } -export interface TimeAndWeatherSettings { +export interface ITimeAndWeatherSettings { isRandomTime: boolean; isRandomWeather: boolean; cloudinessType: CloudinessType; @@ -33,11 +33,11 @@ export interface TimeAndWeatherSettings { timeFlowType: TimeFlowType; hourOfDay: number; } -export interface BotSettings { +export interface IBotSettings { isScavWars: boolean; botAmount: BotAmount; } -export interface WavesSettings { +export interface IWavesSettings { botAmount: BotAmount; botDifficulty: BotDifficulty; isBosses: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IStartLocalRaidRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IStartLocalRaidRequestData.d.ts index d3b1deb..8477df5 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IStartLocalRaidRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IStartLocalRaidRequestData.d.ts @@ -6,6 +6,8 @@ export interface IStartLocalRaidRequestData { playerSide: string; isLocationTransition: boolean; transition: IStartLocalRaidTransition; + /** Should loot generation be skipped, default false */ + sptSkipLootGeneration?: boolean; } export interface IStartLocalRaidTransition { isLocationTransition: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/profile/ISptProfile.d.ts b/TypeScript/9RouterHooks/types/models/eft/profile/ISptProfile.d.ts index cc3be39..8290b1c 100644 --- a/TypeScript/9RouterHooks/types/models/eft/profile/ISptProfile.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/profile/ISptProfile.d.ts @@ -6,21 +6,21 @@ import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; export interface ISptProfile { info: Info; - characters: Characters; + characters: ICharacters; /** Clothing purchases */ suits: string[]; userbuilds: IUserBuilds; - dialogues: Record; - spt: Spt; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + dialogues: Record; + spt: ISpt; + vitality: IVitality; + inraid: IInraid; + insurance: IInsurance[]; /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record>; /** Achievements earned by player */ achievements: Record; } -export declare class TraderPurchaseData { +export declare class ITraderPurchaseData { count: number; purchaseTimestamp: number; } @@ -34,7 +34,7 @@ export interface Info { wipe: boolean; edition: string; } -export interface Characters { +export interface ICharacters { pmc: IPmcData; scav: IPmcData; } @@ -74,13 +74,13 @@ export interface IDefaultEquipmentPreset extends IUserBuild { BuildType: EquipmentBuildType; type: string; } -export interface Dialogue { +export interface IDialogue { attachmentsNew: number; new: number; type: MessageType; Users?: IUserDialogInfo[]; pinned: boolean; - messages: Message[]; + messages: IMessage[]; _id: string; } export interface IUserDialogInfo { @@ -95,16 +95,16 @@ export interface IUserDialogDetails { MemberCategory: MemberCategory; SelectedMemberCategory: MemberCategory; } -export interface DialogueInfo { +export interface IDialogueInfo { attachmentsNew: number; new: number; _id: string; type: MessageType; pinned: boolean; Users?: IUserDialogInfo[]; - message: MessagePreview; + message: IMessagePreview; } -export interface Message { +export interface IMessage { _id: string; uid: string; type: MessageType; @@ -116,7 +116,7 @@ export interface Message { replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; - items?: MessageItems; + items?: IMessageItems; maxStorageTime?: number; systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; @@ -128,7 +128,7 @@ export interface IReplyTo { dt: number; text?: string; } -export interface MessagePreview { +export interface IMessagePreview { uid: string; type: MessageType; dt: number; @@ -136,7 +136,7 @@ export interface MessagePreview { text?: string; systemData?: ISystemData; } -export interface MessageItems { +export interface IMessageItems { stash?: string; data?: IItem[]; } @@ -156,17 +156,13 @@ export interface IUpdatableChatMember { Ignored: boolean; Banned: boolean; } -export interface DateTime { - date: string; - time: string; -} -export interface Spt { +export interface ISpt { /** What version of SPT was this profile made with */ version: string; /** What mods has this profile loaded at any point in time */ - mods?: ModDetails[]; + mods?: IModDetails[]; /** What gifts has this profile received and how many */ - receivedGifts?: ReceivedGift[]; + receivedGifts?: IReceivedGift[]; /** item TPLs blacklisted from being sold on flea for this profile */ blacklistedItemTpls?: string[]; /** key: daily type */ @@ -174,23 +170,23 @@ export interface Spt { /** When was a profile migrated, value is timestamp */ migrations?: Record; } -export interface ModDetails { +export interface IModDetails { name: string; version: string; author: string; dateAdded: number; url: string; } -export interface ReceivedGift { +export interface IReceivedGift { giftId: string; timestampLastAccepted: number; current: number; } -export interface Vitality { - health: Health; - effects: Effects; +export interface IVitality { + health: IHealth; + effects: IEffects; } -export interface Health { +export interface IHealth { Hydration: number; Energy: number; Temperature: number; @@ -202,35 +198,35 @@ export interface Health { LeftLeg: number; RightLeg: number; } -export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; +export interface IEffects { + Head: IHead; + Chest: IChest; + Stomach: IStomach; + LeftArm: ILeftArm; + RightArm: IRightArm; + LeftLeg: ILeftLeg; + RightLeg: IRightLeg; } -export type Head = {}; -export type Chest = {}; -export type Stomach = {}; -export interface LeftArm { +export type IHead = {}; +export type IChest = {}; +export type IStomach = {}; +export interface ILeftArm { Fracture?: number; } -export interface RightArm { +export interface IRightArm { Fracture?: number; } -export interface LeftLeg { +export interface ILeftLeg { Fracture?: number; } -export interface RightLeg { +export interface IRightLeg { Fracture?: number; } -export interface Inraid { +export interface IInraid { location: string; character: string; } -export interface Insurance { +export interface IInsurance { scheduledTime: number; traderId: string; maxStorageTime: number; @@ -239,7 +235,7 @@ export interface Insurance { messageTemplateId: string; items: IItem[]; } -export interface MessageContentRagfair { +export interface IMessageContentRagfair { offerId: string; count: number; handbookId: string; diff --git a/TypeScript/9RouterHooks/types/models/eft/ragfair/IAddOfferRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/ragfair/IAddOfferRequestData.d.ts index 465ee02..b87040a 100644 --- a/TypeScript/9RouterHooks/types/models/eft/ragfair/IAddOfferRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/ragfair/IAddOfferRequestData.d.ts @@ -2,9 +2,9 @@ export interface IAddOfferRequestData { Action: string; sellInOnePiece: boolean; items: string[]; - requirements: Requirement[]; + requirements: IRequirement[]; } -export interface Requirement { +export interface IRequirement { _tpl: string; count: number; level: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/ragfair/IRagfairOffer.d.ts b/TypeScript/9RouterHooks/types/models/eft/ragfair/IRagfairOffer.d.ts index b6b1ed8..77c5605 100644 --- a/TypeScript/9RouterHooks/types/models/eft/ragfair/IRagfairOffer.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/ragfair/IRagfairOffer.d.ts @@ -5,7 +5,7 @@ export interface IRagfairOffer { sellResult?: ISellResult[]; _id: string; items: IItem[]; - requirements: OfferRequirement[]; + requirements: IOfferRequirement[]; root: string; intId: number; /** Handbook price */ @@ -14,6 +14,7 @@ export interface IRagfairOffer { requirementsCost: number; startTime: number; endTime: number; + /** True when offer is sold as pack */ sellInOnePiece: boolean; /** Rouble price - same as requirementsCost */ summaryCost: number; @@ -25,7 +26,7 @@ export interface IRagfairOffer { buyRestrictionCurrent?: number; locked?: boolean; } -export interface OfferRequirement { +export interface IOfferRequirement { _tpl: string; count: number; onlyFunctional: boolean; diff --git a/TypeScript/9RouterHooks/types/models/eft/repair/IRepairActionDataRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/repair/IRepairActionDataRequest.d.ts index d51c1b9..58773df 100644 --- a/TypeScript/9RouterHooks/types/models/eft/repair/IRepairActionDataRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/repair/IRepairActionDataRequest.d.ts @@ -1,10 +1,10 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepairActionDataRequest"; export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; + repairKitsInfo: IRepairKitsInfo[]; target: string; } -export interface RepairKitsInfo { +export interface IRepairKitsInfo { _id: string; count: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts index 50f308e..c55a1d9 100644 --- a/TypeScript/9RouterHooks/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/repair/ITraderRepairActionDataRequest.d.ts @@ -2,9 +2,9 @@ import { IBaseRepairActionDataRequest } from "@spt/models/eft/repair/IBaseRepair export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { Action: "TraderRepair"; tid: string; - repairItems: RepairItem[]; + repairItems: IRepairItem[]; } -export interface RepairItem { +export interface IRepairItem { _id: string; count: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts index 81bc746..2246b86 100644 --- a/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts @@ -12,12 +12,15 @@ export interface IWeather { temp: number; fog: number; rain_intensity: number; + /** 1 - 3 light rain, 3+ 'rain' */ rain: number; wind_gustiness: number; wind_direction: WindDirection; wind_speed: number; + /** < -0.4 = clear day */ cloud: number; time: string; date: string; timestamp: number; + sptInRaidTimestamp: number; } diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts index 302d8f1..cc73cf3 100644 --- a/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -1,8 +1,8 @@ import { IGroupCharacter } from "@spt/models/eft/match/IGroupCharacter"; -import { Message } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; export interface IWsChatMessageReceived extends IWsNotificationEvent { dialogId: string; - message: Message; + message: IMessage; profiles?: IGroupCharacter[]; } diff --git a/TypeScript/9RouterHooks/types/models/enums/AirdropType.d.ts b/TypeScript/9RouterHooks/types/models/enums/AirdropType.d.ts index 2c21ead..103c204 100644 --- a/TypeScript/9RouterHooks/types/models/enums/AirdropType.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/AirdropType.d.ts @@ -1,6 +1,13 @@ export declare enum AirdropTypeEnum { + COMMON = "Common", + SUPPLY = "Supply", + MEDICAL = "Medical", + WEAPON_ARMOR = "Weapon" +} +export declare enum SptAirdropTypeEnum { COMMON = "mixed", SUPPLY = "barter", FOOD_MEDICAL = "foodMedical", - WEAPON_ARMOR = "weaponArmor" + WEAPON_ARMOR = "weaponArmor", + RADAR = "radar" } diff --git a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts index 407fcb0..ab823cc 100644 --- a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts @@ -54,7 +54,5 @@ export declare enum WildSpawnTypeNumber { SKIER = 53, SECTANTPREDVESTNIK = 57, SECTANTPRIZRAK = 58, - SECTANTONI = 59, - SPTUSEC = 100, - SPTBEAR = 101 + SECTANTONI = 59 } diff --git a/TypeScript/9RouterHooks/types/models/enums/hideout/QteEffectType.d.ts b/TypeScript/9RouterHooks/types/models/enums/hideout/QteEffectType.d.ts index 9ecd1a2..08aa9c6 100644 --- a/TypeScript/9RouterHooks/types/models/enums/hideout/QteEffectType.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/hideout/QteEffectType.d.ts @@ -1,5 +1,5 @@ export declare enum QteEffectType { - FINISH_EFFECT = "FinishEffect", - SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect", - SINGLE_FAIL_EFFECT = "SingleFailEffect" + FINISH_EFFECT = "finishEffect", + SINGLE_SUCCESS_EFFECT = "singleSuccessEffect", + SINGLE_FAIL_EFFECT = "singleFailEffect" } diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts index 3977ee5..81acc7d 100644 --- a/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,5 +1,5 @@ import { MinMax } from "@spt/models/common/MinMax"; -export interface BotGenerationDetails { +export interface IBotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; /** assault/pmcBot etc */ diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/GenerateWeaponResult.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/GenerateWeaponResult.d.ts deleted file mode 100644 index 73209ac..0000000 --- a/TypeScript/9RouterHooks/types/models/spt/bots/GenerateWeaponResult.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IMods } from "@spt/models/eft/common/tables/IBotType"; -import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -export declare class GenerateWeaponResult { - weapon: IItem[]; - chosenAmmoTpl: string; - chosenUbglAmmoTpl: string; - weaponMods: IMods; - weaponTemplate: ITemplateItem; -} diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts index 5381cdf..e19a9e0 100644 --- a/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateEquipmentProperties.d.ts @@ -1,6 +1,7 @@ import { IInventory as PmcInventory } from "@spt/models/eft/common/tables/IBotBase"; import { IChances, IMods } from "@spt/models/eft/common/tables/IBotType"; -import { EquipmentFilters, RandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { EquipmentFilters, IRandomisationDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotData } from "./IGenerateWeaponRequest"; export interface IGenerateEquipmentProperties { /** Root Slot being generated */ rootEquipmentSlot: string; @@ -9,14 +10,13 @@ export interface IGenerateEquipmentProperties { modPool: IMods; /** Dictionary of mod items and their chance to spawn for this bot type */ spawnChances: IChances; - /** Role being generated for */ - botRole: string; - /** Level of bot being generated */ - botLevel: number; + /** Bot-specific properties */ + botData: IBotData; inventory: PmcInventory; botEquipmentConfig: EquipmentFilters; /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: IRandomisationDetails; /** OPTIONAL - Do not generate mods for tpls in this array */ generateModsBlacklist?: string[]; + generatingPlayerLevel: number; } diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateWeaponResult.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateWeaponResult.d.ts new file mode 100644 index 0000000..8e1e318 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/bots/IGenerateWeaponResult.d.ts @@ -0,0 +1,10 @@ +import { IMods } from "@spt/models/eft/common/tables/IBotType"; +import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +export interface IGenerateWeaponResult { + weapon: IItem[]; + chosenAmmoTpl: string; + chosenUbglAmmoTpl: string; + weaponMods: IMods; + weaponTemplate: ITemplateItem; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts index d92eea6..b34bda8 100644 --- a/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/bots/IModToSpawnRequest.d.ts @@ -2,7 +2,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ModSpawn } from "@spt/models/enums/ModSpawn"; import { IBotData, IWeaponStats } from "@spt/models/spt/bots/IGenerateWeaponRequest"; -import { EquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; +import { IEquipmentFilterDetails } from "@spt/models/spt/config/IBotConfig"; export interface IModToSpawnRequest { /** Slot mod will fit into */ modSlot: string; @@ -11,7 +11,7 @@ export interface IModToSpawnRequest { /** Parent slot the item will be a part of */ botWeaponSightWhitelist: Record; /** Blacklist to prevent mods from being picked */ - botEquipBlacklist: EquipmentFilterDetails; + botEquipBlacklist: IEquipmentFilterDetails; /** Pool of items to pick from */ itemModPool: Record; /** Array with only weapon tpl in it, ready for mods to be added */ diff --git a/TypeScript/9RouterHooks/types/models/spt/callbacks/IDialogueCallbacks.d.ts b/TypeScript/9RouterHooks/types/models/spt/callbacks/IDialogueCallbacks.d.ts index b30c042..2ff36dc 100644 --- a/TypeScript/9RouterHooks/types/models/spt/callbacks/IDialogueCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/callbacks/IDialogueCallbacks.d.ts @@ -14,11 +14,11 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest" import { ISetDialogReadRequestData } from "@spt/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData"; -import { DialogueInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogueInfo } from "@spt/models/eft/profile/ISptProfile"; export interface IDialogueCallbacks { getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; - getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; + getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData; getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData; getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts index 1858e06..ceca3cc 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IAirdropConfig.d.ts @@ -1,11 +1,12 @@ import { MinMax } from "@spt/models/common/MinMax"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { kind: "spt-airdrop"; - airdropTypeWeightings: Record; + airdropTypeWeightings: Record; /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ loot: Record; + customAirdropMapping: Record; } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface IAirdropChancePercent { @@ -20,6 +21,7 @@ export interface IAirdropChancePercent { } /** Loot inside crate */ export interface IAirdropLoot { + icon: AirdropTypeEnum; /** Min/max of weapons inside crate */ weaponPresetCount?: MinMax; /** Min/max of armors (head/chest/rig) inside crate */ @@ -40,4 +42,6 @@ export interface IAirdropLoot { armorLevelWhitelist?: number[]; /** Should boss items be added to airdrop crate */ allowBossItems: boolean; + useForcedLoot?: boolean; + forcedLoot?: Record; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts index 1954eb0..51a82b3 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBotConfig.d.ts @@ -5,7 +5,7 @@ import { IBotDurability } from "@spt/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { kind: "spt-bot"; /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: IPresetBatch; /** Bot roles that should not have PMC types (pmcBEAR/pmcUSEC) added as enemies to */ botsToNotAddPMCsAsEnemiesTo: string[]; /** What bot types should be classified as bosses */ @@ -44,6 +44,10 @@ export interface IBotConfig extends IBaseConfig { /** What bottypes should be excluded from having loot generated on them (backpack/pocket/vest) does not disable food/drink/special/ */ disableLootOnBotTypes: string[]; assaultToBossConversion: IAssaultToBossConversion; + /** Max length a bots name can be */ + botNameLengthLimit: number; + /** Bot roles that must have a unique name when generated vs other bots in raid */ + botRolesThatMustHaveUniqueName: string[]; } export interface IAssaultToBossConversion { bossConvertEnabled: boolean; @@ -51,7 +55,7 @@ export interface IAssaultToBossConversion { bossConvertMinMax: Record; } /** Number of bots to generate and store in cache on raid start per bot type */ -export interface PresetBatch { +export interface IPresetBatch { assault: number; bossBully: number; bossGluhar: number; @@ -100,7 +104,7 @@ export interface IWalletLootSettings { } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: IModLimits; /** Whitelist for weapon sight types allowed per gun */ weaponSightWhitelist: Record; /** Chance face shield is down/active */ @@ -121,27 +125,27 @@ export interface EquipmentFilters { /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ weaponSlotIdsToMakeRequired?: string[]; /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: IRandomisationDetails[]; /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: IEquipmentFilterDetails[]; /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: IEquipmentFilterDetails[]; /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: IWeightingAdjustmentDetails[]; /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: IWeightingAdjustmentDetails[]; /** Should the stock mod be forced to spawn on bot */ forceStock?: boolean; armorPlateWeighting?: IArmorPlateWeights[]; forceRigWhenNoVest?: boolean; } -export interface ModLimits { +export interface IModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ scopeLimit?: number; /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ lightLaserLimit?: number; } -export interface RandomisationDetails { +export interface IRandomisationDetails { /** Between what levels do these randomisation setting apply to */ levelRange: MinMax; generation?: Record; @@ -155,8 +159,13 @@ export interface RandomisationDetails { weaponMods?: Record; /** Equipment mod chances */ equipmentMods?: Record; + nighttimeChanges?: INighttimeChanges; } -export interface EquipmentFilterDetails { +export interface INighttimeChanges { + /** Applies changes to values stored in equipmentMods */ + equipmentModsModifiers: Record; +} +export interface IEquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ levelRange: MinMax; /** Key: mod slot name e.g. mod_magazine, value: item tpls */ @@ -164,7 +173,7 @@ export interface EquipmentFilterDetails { /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ cartridge: Record; } -export interface WeightingAdjustmentDetails { +export interface IWeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ levelRange: MinMax; /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IBotDurability.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IBotDurability.d.ts index 8dc9d02..b7103e1 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IBotDurability.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IBotDurability.d.ts @@ -1,6 +1,6 @@ export interface IBotDurability { default: IDefaultDurability; - pmc: PmcDurability; + pmc: IPmcDurability; boss: IBotDurability; follower: IBotDurability; assault: IBotDurability; @@ -20,7 +20,7 @@ export interface IDefaultDurability { armor: IArmorDurability; weapon: IWeaponDurability; } -export interface PmcDurability { +export interface IPmcDurability { armor: IPmcDurabilityArmor; weapon: IWeaponDurability; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IHealthConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IHealthConfig.d.ts index b86c208..f7521ca 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IHealthConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IHealthConfig.d.ts @@ -1,14 +1,14 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { kind: "spt-health"; - healthMultipliers: HealthMultipliers; - save: Save; + healthMultipliers: IHealthMultipliers; + save: ISave; } -export interface HealthMultipliers { +export interface IHealthMultipliers { death: number; blacked: number; } -export interface Save { +export interface ISave { health: boolean; effects: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts index ec0c181..5257777 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IHideoutConfig.d.ts @@ -18,11 +18,11 @@ export interface ICultistCircleSettings { maxRewardItemCount: number; maxAttemptsToPickRewardsWithinBudget: number; rewardPriceMultiplerMinMax: MinMax; - craftTimeThreshholds: CraftTimeThreshhold[]; + craftTimeThreshholds: ICraftTimeThreshhold[]; /** -1 means no override */ craftTimeOverride: number; /** Specific reward pool when player sacrificed one specific item */ - directRewards: Record; + directRewards: Record; directRewardStackSize: Record; /** Item tpls to exclude from the reward pool */ rewardItemBlacklist: string[]; @@ -30,10 +30,10 @@ export interface ICultistCircleSettings { additionalRewardItemPool: string[]; currencyRewards: Record; } -export interface CraftTimeThreshhold extends MinMax { +export interface ICraftTimeThreshhold extends MinMax { craftTimeSeconds: number; } -export interface DirectRewardSettings { +export interface IDirectRewardSettings { rewardTpls: string[]; craftTimeSeconds: number; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts index d5fe8f6..d70f638 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInRaidConfig.d.ts @@ -2,9 +2,9 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { kind: "spt-inraid"; /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: IRaidMenuSettings; /** What effects should be saved post-raid */ - save: Save; + save: ISave; /** Names of car extracts */ carExtracts: string[]; /** Names of coop extracts */ @@ -14,7 +14,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Fence rep gain from a single coop extract */ coopExtractBaseStandingGain: number; /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractStandingGain: number; /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ @@ -24,7 +24,7 @@ export interface IInRaidConfig extends IBaseConfig { /** Percentage chance a player scav hot is hostile to the player when scavving */ playerScavHostileChancePercent: number; } -export interface RaidMenuSettings { +export interface IRaidMenuSettings { aiAmount: string; aiDifficulty: string; bossEnabled: boolean; @@ -34,7 +34,7 @@ export interface RaidMenuSettings { randomWeather: boolean; randomTime: boolean; } -export interface Save { +export interface ISave { /** Should loot gained from raid be saved */ loot: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts index 3a2de2a..af0ec79 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts @@ -4,14 +4,14 @@ export interface IInventoryConfig extends IBaseConfig { kind: "spt-inventory"; /** Should new items purchased by flagged as found in raid */ newItemsMarkedFound: boolean; - randomLootContainers: Record; + randomLootContainers: Record; sealedAirdropContainer: ISealedAirdropContainerSettings; /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; } -export interface RewardDetails { +export interface IRewardDetails { rewardCount: number; foundInRaid: boolean; rewardTplPool?: Record; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IPlayerScavConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IPlayerScavConfig.d.ts index 9c1046f..f684f45 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IPlayerScavConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IPlayerScavConfig.d.ts @@ -2,16 +2,16 @@ import { IGenerationData } from "@spt/models/eft/common/tables/IBotType"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { kind: "spt-playerscav"; - karmaLevel: Record; + karmaLevel: Record; } -export interface KarmaLevel { +export interface IKarmaLevel { botTypeForLoot: string; - modifiers: Modifiers; + modifiers: IModifiers; itemLimits: ItemLimits; equipmentBlacklist: Record; lootItemsToAddChancePercent: Record; } -export interface Modifiers { +export interface IModifiers { equipment: Record; mod: Record; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts index 8fd2e5f..2e68219 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts @@ -9,11 +9,11 @@ export interface IPmcConfig extends IBaseConfig { /** What account type should the PMC have */ accountTypeWeight: Record; /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: ISlotLootSettings; /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: ISlotLootSettings; /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: ISlotLootSettings; /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ useDifficultyOverride: boolean; /** Difficulty override e.g. "AsOnline/Hard" */ @@ -32,7 +32,7 @@ export interface IPmcConfig extends IBaseConfig { bearType: string; /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ pmcType: Record>>; - maxBackpackLootTotalRub: MinMaxLootValue[]; + maxBackpackLootTotalRub: IMinMaxLootValue[]; maxPocketLootTotalRub: number; maxVestLootTotalRub: number; /** Percentage chance a bot from a wave is converted into a PMC, first key = map, second key = bot wildspawn type (assault/exusec), value: min+max chance to be converted */ @@ -61,14 +61,14 @@ export interface IHostilitySettings { additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; } -export interface PmcTypes { +export interface IPmcTypes { usec: string; bear: string; } -export interface SlotLootSettings { +export interface ISlotLootSettings { whitelist: string[]; blacklist: string[]; } -export interface MinMaxLootValue extends MinMax { +export interface IMinMaxLootValue extends MinMax { value: number; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts index a62f2c9..9b17861 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts @@ -7,13 +7,13 @@ export interface IRagfairConfig extends IBaseConfig { /** Default values used to hydrate `runIntervalSeconds` with */ runIntervalValues: IRunIntervalValues; /** Player listing settings */ - sell: Sell; + sell: ISell; /** Trader ids + should their assorts be listed on flea */ traders: Record; - dynamic: Dynamic; + dynamic: IDynamic; tieredFlea: ITieredFlea; } -export interface Sell { +export interface ISell { /** Should a fee be deducted from player when liting an item for sale */ fees: boolean; /** Settings to control chances of offer being sold */ @@ -33,7 +33,7 @@ export interface Chance { /** Min possible sell chance % for a player listed offer */ minSellChancePercent: number; } -export interface Dynamic { +export interface IDynamic { purchasesAreFoundInRaid: boolean; /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ useTraderPriceForOffersIfHigher: boolean; @@ -41,7 +41,7 @@ export interface Dynamic { barter: IBarterDetails; pack: IPackDetails; /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: IOfferAdjustment; /** How many offers should expire before an offer regeneration occurs */ expiredOfferThreshold: number; /** How many offers should be listed */ @@ -70,7 +70,7 @@ export interface Dynamic { /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ removeSeasonalItemsWhenNotInEvent: boolean; /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; } @@ -103,7 +103,7 @@ export interface IPackDetails { /** item types to allow being a pack */ itemTypeWhitelist: string[]; } -export interface OfferAdjustment { +export interface IOfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ adjustPriceWhenBelowHandbookPrice: boolean; /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ @@ -119,7 +119,7 @@ export interface Condition { current: MinMax; max: MinMax; } -export interface Blacklist { +export interface IRagfairBlacklist { /** Damaged ammo packs */ damagedAmmoPacks: boolean; /** Custom blacklist for item Tpls */ @@ -159,7 +159,10 @@ export interface IArmorSettings { } export interface ITieredFlea { enabled: boolean; - unlocks: Record; + /** key: tpl, value: playerlevel */ + unlocksTpl: Record; + /** key: item type id, value: playerlevel */ + unlocksType: Record; ammoTiersEnabled: boolean; ammoTplUnlocks: Record; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IRepairConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IRepairConfig.d.ts index 12a87fa..eca8e6c 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IRepairConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IRepairConfig.d.ts @@ -10,7 +10,7 @@ export interface IRepairConfig extends IBaseConfig { repairKitIntellectGainMultiplier: IIntellectGainValues; maxIntellectGainPerRepair: IMaxIntellectGainValues; weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + repairKit: IRepairKit; } export interface IIntellectGainValues { weapon: number; @@ -30,17 +30,17 @@ export interface IWeaponTreatmentRepairValues { /** The multiplier used for calculating weapon maintenance XP */ pointGainMultiplier: number; } -export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; +export interface IRepairKit { + armor: IBonusSettings; + weapon: IBonusSettings; } -export interface BonusSettings { +export interface IBonusSettings { rarityWeight: Record; bonusTypeWeight: Record; - common: Record; - rare: Record; + common: Record; + rare: Record; } -export interface BonusValues { +export interface IBonusValues { valuesMinMax: MinMax; /** What dura is buff active between (min max of current max) */ activeDurabilityPercentMinMax: MinMax; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts index 4388202..31a213b 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ITraderConfig.d.ts @@ -1,24 +1,24 @@ import { MinMax } from "@spt/models/common/MinMax"; import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { ILootRequest } from "@spt/models/spt/services/ILootRequest"; export interface ITraderConfig extends IBaseConfig { kind: "spt-trader"; - updateTime: UpdateTime[]; + updateTime: IUpdateTime[]; purchasesAreFoundInRaid: boolean; /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ tradersResetFromServerStart: boolean; updateTimeDefault: number; traderPriceMultipler: number; - fence: FenceConfig; - moddedTraders: ModdedTraders; + fence: IFenceConfig; + moddedTraders: IModdedTraders; } -export interface UpdateTime { +export interface IUpdateTime { traderId: string; /** Seconds between trader resets */ seconds: MinMax; } -export interface FenceConfig { - discountOptions: DiscountOptions; +export interface IFenceConfig { + discountOptions: IDiscountOptions; partialRefreshTimeSeconds: number; partialRefreshChangePercent: number; assortSize: number; @@ -45,19 +45,19 @@ export interface FenceConfig { /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ ammoMaxPenLimit: number; blacklist: string[]; - coopExtractGift: CoopExtractReward; + coopExtractGift: ICoopExtractReward; btrDeliveryExpireHours: number; } export interface IItemDurabilityCurrentMax { current: MinMax; max: MinMax; } -export interface CoopExtractReward extends LootRequest { +export interface ICoopExtractReward extends ILootRequest { sendGift: boolean; messageLocaleIds: string[]; giftExpiryHours: number; } -export interface DiscountOptions { +export interface IDiscountOptions { assortSize: number; itemPriceMult: number; presetPriceMult: number; @@ -65,7 +65,7 @@ export interface DiscountOptions { equipmentPresetMinMax: MinMax; } /** Custom trader data needed client side for things such as the clothing service */ -export interface ModdedTraders { +export interface IModdedTraders { /** Trader Ids to enable the clothing service for */ clothingService: string[]; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts index 970ade5..012f26c 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts @@ -5,7 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "spt-weather"; acceleration: number; - weather: Weather; + weather: IWeatherValues; seasonDates: ISeasonDateTimes[]; overrideSeason?: Season; } @@ -17,7 +17,9 @@ export interface ISeasonDateTimes { endDay: number; endMonth: number; } -export interface Weather { +export interface IWeatherValues { + /** How many hours to generate weather data into the future */ + generateWeatherAmountHours: number; clouds: WeatherSettings; windSpeed: WeatherSettings; windDirection: WeatherSettings; @@ -25,8 +27,14 @@ export interface Weather { rain: WeatherSettings; rainIntensity: MinMax; fog: WeatherSettings; - temp: MinMax; + temp: Record; pressure: MinMax; + /** Length of each weather period */ + timePeriod: WeatherSettings; +} +export interface ITempDayNight { + day: MinMax; + night: MinMax; } export interface WeatherSettings { values: T[]; diff --git a/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts b/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts index c3c23db..8cb11f2 100644 --- a/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/dialog/ISendMessageDetails.d.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { ISystemData, IUserDialogInfo, MessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; export interface ISendMessageDetails { @@ -24,7 +24,7 @@ export interface ISendMessageDetails { /** Optional - ragfair related */ systemData?: ISystemData; /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: IMessageContentRagfair; /** OPTIONAL - allows modification of profile settings via mail */ profileChangeEvents?: IProfileChangeEvent[]; } diff --git a/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts b/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts index ee1893d..3b4174f 100644 --- a/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/hideout/ScavCaseRewardCountsAndPrices.d.ts @@ -1,9 +1,9 @@ -export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; +export interface IScavCaseRewardCountsAndPrices { + Common: IRewardCountAndPriceDetails; + Rare: IRewardCountAndPriceDetails; + Superrare: IRewardCountAndPriceDetails; } -export interface RewardCountAndPriceDetails { +export interface IRewardCountAndPriceDetails { minCount: number; maxCount: number; minPriceRub: number; diff --git a/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts b/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts index 65996c1..87de429 100644 --- a/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/mod/NewItemDetails.d.ts @@ -1,4 +1,4 @@ -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; export declare abstract class NewItemDetailsBase { /** Price of the item on flea market */ fleaPriceRoubles: number; @@ -16,7 +16,7 @@ export declare class NewItemFromCloneDetails extends NewItemDetailsBase { /** Id of the item to copy and use as a base */ itemTplToClone: string; /** Item properties that should be applied over the top of the cloned base */ - overrideProperties: Props; + overrideProperties: IProps; /** ParentId for the new item (item type) */ parentId: string; /** diff --git a/TypeScript/9RouterHooks/types/models/spt/ragfair/ITplWithFleaPrice.d.ts b/TypeScript/9RouterHooks/types/models/spt/ragfair/ITplWithFleaPrice.d.ts new file mode 100644 index 0000000..4b76836 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/ragfair/ITplWithFleaPrice.d.ts @@ -0,0 +1,5 @@ +export interface ITplWithFleaPrice { + tpl: string; + /** Roubles */ + price: number; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts index 2bca633..4e98dd5 100644 --- a/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/server/ISettingsBase.d.ts @@ -1,25 +1,25 @@ export interface ISettingsBase { - config: Config; + config: IConfig; } -export interface Config { +export interface IConfig { AFKTimeoutSeconds: number; AdditionalRandomDelaySeconds: number; ClientSendRateLimit: number; CriticalRetriesCount: number; DefaultRetriesCount: number; FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; + FramerateLimit: IFramerateLimit; GroupStatusInterval: number; GroupStatusButtonInterval: number; KeepAliveInterval: number; LobbyKeepAliveInterval: number; Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; + MemoryManagementSettings: IMemoryManagementSettings; NVidiaHighlights: boolean; NextCycleDelaySeconds: number; PingServerResultSendInterval: number; PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; + ReleaseProfiler: IReleaseProfiler; RequestConfirmationTimeouts: number[]; RequestsMadeThroughLobby: string[]; SecondCycleDelaySeconds: number; @@ -30,12 +30,12 @@ export interface Config { NetworkStateView: INetworkStateView; WsReconnectionDelays: string[]; } -export interface FramerateLimit { +export interface IFramerateLimit { MaxFramerateGameLimit: number; MaxFramerateLobbyLimit: number; MinFramerateLimit: number; } -export interface MemoryManagementSettings { +export interface IMemoryManagementSettings { AggressiveGC: boolean; GigabytesRequiredToDisableGCDuringRaid: number; HeapPreAllocationEnabled: boolean; @@ -43,7 +43,7 @@ export interface MemoryManagementSettings { OverrideRamCleanerSettings: boolean; RamCleanerEnabled: boolean; } -export interface ReleaseProfiler { +export interface IReleaseProfiler { Enabled: boolean; MaxRecords: number; RecordTriggerValue: number; diff --git a/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts deleted file mode 100644 index 3301a55..0000000 --- a/TypeScript/9RouterHooks/types/models/spt/services/CustomPreset.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IPreset } from "@spt/models/eft/common/IGlobals"; -export interface CustomPreset { - key: string; - preset: IPreset; -} diff --git a/TypeScript/9RouterHooks/types/models/spt/services/CustomTraderAssortData.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/CustomTraderAssortData.d.ts deleted file mode 100644 index 7ad6341..0000000 --- a/TypeScript/9RouterHooks/types/models/spt/services/CustomTraderAssortData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; -import { Traders } from "@spt/models/enums/Traders"; -export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; -} diff --git a/TypeScript/9RouterHooks/types/models/spt/services/ILootRequest.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/ILootRequest.d.ts new file mode 100644 index 0000000..22bff2f --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/spt/services/ILootRequest.d.ts @@ -0,0 +1,33 @@ +import { MinMax } from "@spt/models/common/MinMax"; +import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +export interface ILootRequest { + /** Count of weapons to generate */ + weaponPresetCount: MinMax; + /** Count of armor to generate */ + armorPresetCount: MinMax; + /** Count of items to generate */ + itemCount: MinMax; + /** Count of sealed weapon crates to generate */ + weaponCrateCount: MinMax; + /** Item tpl blacklist to exclude */ + itemBlacklist: string[]; + /** Item tpl whitelist to pick from */ + itemTypeWhitelist: string[]; + /** key: item base type: value: max count */ + itemLimits: Record; + itemStackLimits: Record; + /** Allowed armor plate levels 2/3/4/5/6 for armor generated */ + armorLevelWhitelist: number[]; + /** Should boss items be included in allowed items */ + allowBossItems: boolean; + /** Should item.json item reward blacklist be used */ + useRewardItemBlacklist?: boolean; + /** Should forced loot be used instead of randomised loot */ + useForcedLoot?: boolean; + /** Item tpls + count of items to force include */ + forcedLoot?: Record; +} +export interface IAirdropLootRequest extends ILootRequest { + /** Airdrop icon used by client to show crate type */ + icon?: AirdropTypeEnum; +} diff --git a/TypeScript/9RouterHooks/types/models/spt/services/LootItem.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/LootItem.d.ts index acb7606..2d2f236 100644 --- a/TypeScript/9RouterHooks/types/models/spt/services/LootItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/services/LootItem.d.ts @@ -1,4 +1,4 @@ -export declare class LootItem { +export declare class ILootItem { id?: string; tpl: string; isPreset: boolean; diff --git a/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts b/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts deleted file mode 100644 index c52a876..0000000 --- a/TypeScript/9RouterHooks/types/models/spt/services/LootRequest.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { MinMax } from "@spt/models/common/MinMax"; -export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; - /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; - useRewarditemBlacklist?: boolean; -} diff --git a/TypeScript/9RouterHooks/types/models/spt/utils/ILogger.d.ts b/TypeScript/9RouterHooks/types/models/spt/utils/ILogger.d.ts index 1b9726d..32c4941 100644 --- a/TypeScript/9RouterHooks/types/models/spt/utils/ILogger.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/utils/ILogger.d.ts @@ -1,8 +1,8 @@ -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; + writeToLogFile(data: string | IDaum): void; log(data: string | Record | Error, color: string, backgroundColor?: string): void; logWithColor(data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor): void; error(data: string): void; diff --git a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts index 614a75c..88ffb5d 100644 --- a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts @@ -1,7 +1,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IHideoutImprovement, IMoneyTransferLimits, IProductive, ITraderInfo } from "@spt/models/eft/common/tables/IBotBase"; -import { TraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; +import { ITraderData } from "@spt/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { TimeUtil } from "@spt/utils/TimeUtil"; import { ICloner } from "@spt/utils/cloners/ICloner"; @@ -36,7 +36,7 @@ export declare class EventOutputHolder { * @param traderData server data for traders * @returns dict of trader id + TraderData */ - protected constructTraderRelations(traderData: Record): Record; + protected constructTraderRelations(traderData: Record): Record; /** * Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts b/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts index 54499bf..9311f82 100644 --- a/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts +++ b/TypeScript/9RouterHooks/types/servers/http/SptHttpListener.d.ts @@ -19,14 +19,26 @@ export declare class SptHttpListener implements IHttpListener { canHandle(_: string, req: IncomingMessage): boolean; handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** - * Send http response to the client - * @param sessionID Player id + * Send HTTP response back to sender + * @param sessionID Player id making request * @param req Incoming request * @param resp Outgoing response * @param body Buffer * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; + /** + * Is request flagged as debug enabled + * @param req Incoming request + * @returns True if request is flagged as debug + */ + protected isDebugRequest(req: IncomingMessage): boolean; + /** + * Log request if enabled + * @param req Incoming message request + * @param output Output string + */ + protected logRequest(req: IncomingMessage, output: string): void; getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/9RouterHooks/types/services/AirdropService.d.ts b/TypeScript/9RouterHooks/types/services/AirdropService.d.ts index 465ee48..02e6fad 100644 --- a/TypeScript/9RouterHooks/types/services/AirdropService.d.ts +++ b/TypeScript/9RouterHooks/types/services/AirdropService.d.ts @@ -2,10 +2,11 @@ import { LootGenerator } from "@spt/generators/LootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; +import { IGetAirdropLootRequest } from "@spt/models/eft/location/IGetAirdropLootRequest"; import { IGetAirdropLootResponse } from "@spt/models/eft/location/IGetAirdropLootResponse"; -import { AirdropTypeEnum } from "@spt/models/enums/AirdropType"; +import { AirdropTypeEnum, SptAirdropTypeEnum } from "@spt/models/enums/AirdropType"; import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig"; -import { LootRequest } from "@spt/models/spt/services/LootRequest"; +import { IAirdropLootRequest } from "@spt/models/spt/services/ILootRequest"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -26,28 +27,30 @@ export declare class AirdropService { protected cloner: ICloner; protected airdropConfig: IAirdropConfig; constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseService: DatabaseService, configServer: ConfigServer, cloner: ICloner); + generateCustomAirdropLoot(request: IGetAirdropLootRequest): IGetAirdropLootResponse; /** * Handle client/location/getAirdropLoot * Get loot for an airdrop container * Generates it randomly based on config/airdrop.json values + * @param forcedAirdropType OPTIONAL - Desired airdrop type, randomised when not provided * @returns Array of LootItem objects */ - generateAirdropLoot(): IGetAirdropLootResponse; + generateAirdropLoot(forcedAirdropType?: any): IGetAirdropLootResponse; /** * Create a container create item based on passed in airdrop type * @param airdropType What tpye of container: weapon/common etc * @returns Item */ - protected getAirdropCrateItem(airdropType: AirdropTypeEnum): IItem; + protected getAirdropCrateItem(airdropType: SptAirdropTypeEnum): IItem; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value */ - protected chooseAirdropType(): AirdropTypeEnum; + protected chooseAirdropType(): SptAirdropTypeEnum; /** * Get the configuration for a specific type of airdrop * @param airdropType Type of airdrop to get settings for * @returns LootRequest */ - protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): LootRequest; + protected getAirdropLootConfigByType(airdropType: AirdropTypeEnum): IAirdropLootRequest; } diff --git a/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts b/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts index 7d51b1e..10b8af6 100644 --- a/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotEquipmentFilterService.d.ts @@ -1,8 +1,8 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { EquipmentChances, IBotType, IGeneration, IGenerationData, IModsChances } from "@spt/models/eft/common/tables/IBotType"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; -import { EquipmentFilterDetails, EquipmentFilters, IAdjustmentDetails, IBotConfig, WeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; +import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +import { EquipmentFilters, IAdjustmentDetails, IBotConfig, IEquipmentFilterDetails, IWeightingAdjustmentDetails } from "@spt/models/spt/config/IBotConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; export declare class BotEquipmentFilterService { @@ -20,7 +20,7 @@ export declare class BotEquipmentFilterService { * @param botLevel Level of the bot * @param botGenerationDetails details on how to generate a bot */ - filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: BotGenerationDetails): void; + filterBotEquipment(sessionId: string, baseBotNode: IBotType, botLevel: number, botGenerationDetails: IBotGenerationDetails): void; /** * Iterate over the changes passed in and apply them to baseValues parameter * @param equipmentChanges Changes to apply @@ -51,28 +51,28 @@ export declare class BotEquipmentFilterService { * @param playerLevel Level of the player * @returns EquipmentBlacklistDetails object */ - getBotEquipmentBlacklist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + getBotEquipmentBlacklist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Get the whitelist for a specific bot type that's within the players level * @param botRole Bot type * @param playerLevel Players level * @returns EquipmentFilterDetails object */ - protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails | undefined; + protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): IEquipmentFilterDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on bot level * @param botRole Bot type to get adjustments for * @param botLevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustments(botRole: string, botLevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustments(botRole: string, botLevel: number): IWeightingAdjustmentDetails | undefined; /** * Retrieve item weighting adjustments from bot.json config based on player level * @param botRole Bot type to get adjustments for * @param playerlevel Level of bot * @returns Weighting adjustments for bot items */ - protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): WeightingAdjustmentDetails | undefined; + protected getBotWeightingAdjustmentsByPlayerLevel(botRole: string, playerlevel: number): IWeightingAdjustmentDetails | undefined; /** * Filter bot equipment based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -80,7 +80,7 @@ export declare class BotEquipmentFilterService { * @param blacklist equipment blacklist * @returns Filtered bot file */ - protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterEquipment(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Filter bot cartridges based on blacklist and whitelist from config/bot.json * Prioritizes whitelist first, if one is found blacklist is ignored @@ -89,7 +89,7 @@ export declare class BotEquipmentFilterService { * @param whitelist equipment on this list should be used exclusively * @returns Filtered bot file */ - protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void; + protected filterCartridges(baseBotNode: IBotType, blacklist: IEquipmentFilterDetails, whitelist: IEquipmentFilterDetails): void; /** * Add/Edit weighting changes to bot items using values from config/bot.json/equipment * @param weightingAdjustments Weighting change to apply to bot diff --git a/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts b/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts index 2b51c5b..815d2ab 100644 --- a/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts @@ -1,7 +1,7 @@ import { PMCLootGenerator } from "@spt/generators/PMCLootGenerator"; import { ItemHelper } from "@spt/helpers/ItemHelper"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IBotLootCache, LootCacheType } from "@spt/models/spt/bots/IBotLootCache"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt/servers/DatabaseServer"; @@ -50,25 +50,25 @@ export declare class BotLootCacheService { * @param props * @returns */ - protected isBulletOrGrenade(props: Props): boolean; + protected isBulletOrGrenade(props: IProps): boolean; /** * Internal and external magazine have this property * @param props * @returns */ - protected isMagazine(props: Props): boolean; + protected isMagazine(props: IProps): boolean; /** * Medical use items (e.g. morphine/lip balm/grizzly) * @param props * @returns */ - protected isMedicalItem(props: Props): boolean; + protected isMedicalItem(props: IProps): boolean; /** * Grenades have this property (e.g. smoke/frag/flash grenades) * @param props * @returns */ - protected isGrenade(props: Props): boolean; + protected isGrenade(props: IProps): boolean; protected isFood(tpl: string): boolean; protected isDrink(tpl: string): boolean; protected isCurrency(tpl: string): boolean; diff --git a/TypeScript/9RouterHooks/types/services/BotNameService.d.ts b/TypeScript/9RouterHooks/types/services/BotNameService.d.ts index e5b0f22..056bd0f 100644 --- a/TypeScript/9RouterHooks/types/services/BotNameService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotNameService.d.ts @@ -1,5 +1,7 @@ +import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; +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"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -12,6 +14,7 @@ export declare class BotNameService { protected logger: ILogger; protected randomUtil: RandomUtil; protected profileHelper: ProfileHelper; + protected botHelper: BotHelper; protected databaseService: DatabaseService; protected localisationService: LocalisationService; protected configServer: ConfigServer; @@ -19,22 +22,21 @@ export declare class BotNameService { protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected usedNameCache: Set; - constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); + constructor(logger: ILogger, randomUtil: RandomUtil, profileHelper: ProfileHelper, botHelper: BotHelper, databaseService: DatabaseService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Clear out any entries in Name Set */ clearNameCache(): void; /** * Create a unique bot nickname - * @param firstNames FIRST names to choose from - * @param lastNames OPTIONAL: Names to choose from + * @param botJsonTemplate bot JSON data from db * @param botGenerationDetails * @param botRole role of bot e.g. assault * @param uniqueRoles Lowercase roles to always make unique * @param sessionId OPTIONAL: profile session id * @returns Nickname for bot */ - generateUniqueBotNickname(firstNames: string[], lastNames: string[], botGenerationDetails: BotGenerationDetails, botRole: string, uniqueRoles?: string[], sessionId?: string): string; + 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 diff --git a/TypeScript/9RouterHooks/types/services/CircleOfCultistService.d.ts b/TypeScript/9RouterHooks/types/services/CircleOfCultistService.d.ts index 7b21750..e4d3410 100644 --- a/TypeScript/9RouterHooks/types/services/CircleOfCultistService.d.ts +++ b/TypeScript/9RouterHooks/types/services/CircleOfCultistService.d.ts @@ -8,9 +8,9 @@ import { IBotHideoutArea } from "@spt/models/eft/common/tables/IBotBase"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IStageRequirement } from "@spt/models/eft/hideout/IHideoutArea"; import { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData"; -import { IHideoutProduction, IHideoutProductionData, IRequirementBase, Requirement } from "@spt/models/eft/hideout/IHideoutProduction"; +import { IHideoutProduction, IHideoutProductionData, IRequirement, IRequirementBase } from "@spt/models/eft/hideout/IHideoutProduction"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { DirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; +import { IDirectRewardSettings, IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt/routers/EventOutputHolder"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -59,7 +59,7 @@ export declare class CircleOfCultistService { * @param rewardAmountRoubles Rouble amount to reward player in items with * @param directRewardSettings OPTIONAL: If craft is giving direct rewards */ - protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): void; + protected registerCircleOfCultistProduction(sessionId: string, pmcData: IPmcData, recipeId: string, sacrificedItems: IItem[], rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): void; /** * Get the circle craft time as seconds, value is based on reward item value * OR rewards are direct, then use custom craft time defined in oarameter object @@ -67,7 +67,7 @@ export declare class CircleOfCultistService { * @param directRewardSettings OPTIONAL: If craft is giving direct rewards * @returns craft time seconds */ - protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: DirectRewardSettings): number; + protected getCircleCraftTimeSeconds(rewardAmountRoubles: number, directRewardSettings?: IDirectRewardSettings): number; /** * Get the items player sacrificed in circle * @param pmcData Player profile @@ -88,7 +88,7 @@ export declare class CircleOfCultistService { * @param cultistCircleStashId Id of stash item * @returns Array of item arrays */ - protected getExplicitRewards(explicitRewardSettings: DirectRewardSettings, cultistCircleStashId: string): IItem[][]; + protected getExplicitRewards(explicitRewardSettings: IDirectRewardSettings, cultistCircleStashId: string): IItem[][]; /** * Explicit rewards have thier own stack sizes as they dont use a reward rouble pool * @param rewardTpl Item being rewarded to get stack size of @@ -128,5 +128,5 @@ export declare class CircleOfCultistService { * @param requirements Requirements to iterate over * @returns Array of item requirements */ - protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | Requirement)[]; + protected getItemRequirements(requirements: IRequirementBase[]): (IStageRequirement | IRequirement)[]; } diff --git a/TypeScript/9RouterHooks/types/services/InMemoryCacheService.d.ts b/TypeScript/9RouterHooks/types/services/InMemoryCacheService.d.ts new file mode 100644 index 0000000..6f11dd7 --- /dev/null +++ b/TypeScript/9RouterHooks/types/services/InMemoryCacheService.d.ts @@ -0,0 +1,29 @@ +import { ICloner } from "@spt/utils/cloners/ICloner"; +export declare class InMemoryCacheService { + protected cloner: ICloner; + protected cacheData: Record; + constructor(cloner: ICloner); + /** + * Store data into an in-memory object + * @param key key to store data against + * @param dataToCache - Data to store in cache + */ + storeByKey(key: string, dataToCache: any): void; + /** + * Retreve data stored by a key + * @param key key + * @returns Stored data + */ + getDataByKey(key: string): any | undefined; + /** + * Does data exists against the provided key + * @param key Key to check for data against + * @returns true if exists + */ + hasStoredDataByKey(key: string): boolean; + /** + * Remove data stored against key + * @param key Key to remove data against + */ + clearDataStoredByKey(key: string): void; +} diff --git a/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts b/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts index 10be5af..ba90302 100644 --- a/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts +++ b/TypeScript/9RouterHooks/types/services/LocationLifecycleService.d.ts @@ -86,9 +86,11 @@ export declare class LocationLifecycleService { /** * Generate a maps base location (cloned) and loot * @param name Map name + * @param generateLoot OPTIONAL - Should loot be generated for the map before being returned * @returns ILocationBase */ - protected generateLocationAndLoot(name: string): ILocationBase; + protected generateLocationAndLoot(name: string, generateLoot?: boolean): ILocationBase; + /** Handle client/match/local/end */ endLocalRaid(sessionId: string, request: IEndLocalRaidRequestData): void; /** * Was extract by car @@ -125,8 +127,18 @@ export declare class LocationLifecycleService { * @returns True if coop extract */ protected extractTakenWasCoop(extractName: string): boolean; - protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, request: IEndLocalRaidRequestData): void; - protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, postRaidProfile: IPmcData, isDead: boolean, isSurvived: boolean, request: IEndLocalRaidRequestData, locationName: string): void; + protected handlePostRaidPlayerScav(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData): void; + /** + * + * @param sessionId Player id + * @param pmcProfile Pmc profile + * @param scavProfile Scav profile + * @param isDead Player died/got left behind in raid + * @param isSurvived Not same as opposite of `isDead`, specific status + * @param request + * @param locationName + */ + protected handlePostRaidPmc(sessionId: string, pmcProfile: IPmcData, scavProfile: IPmcData, isDead: boolean, isSurvived: boolean, isTransfer: boolean, request: IEndLocalRaidRequestData, locationName: string): void; /** * Convert post-raid quests into correct format * Quest status comes back as a string version of the enum `Success`, not the expected value of 1 @@ -162,10 +174,16 @@ export declare class LocationLifecycleService { protected isPlayerSurvived(results: IEndRaidResult): boolean; /** * Is the player dead after a raid - dead = anything other than "survived" / "runner" - * @param statusOnExit Exit value from offraidData object + * @param results Post raid request * @returns true if dead */ protected isPlayerDead(results: IEndRaidResult): boolean; + /** + * Has the player moved from one map to another + * @param results Post raid request + * @returns True if players transfered + */ + protected isMapToMapTransfer(results: IEndRaidResult): boolean; /** * Reset the skill points earned in a raid to 0, ready for next raid * @param commonSkills Profile common skills to update diff --git a/TypeScript/9RouterHooks/types/services/MailSendService.d.ts b/TypeScript/9RouterHooks/types/services/MailSendService.d.ts index 5845520..5887ee7 100644 --- a/TypeScript/9RouterHooks/types/services/MailSendService.d.ts +++ b/TypeScript/9RouterHooks/types/services/MailSendService.d.ts @@ -4,7 +4,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { Dialogue, ISystemData, IUserDialogInfo, Message, MessageContentRagfair, MessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage, IMessageContentRagfair, IMessageItems, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; import { IProfileChangeEvent, ISendMessageDetails } from "@spt/models/spt/dialog/ISendMessageDetails"; @@ -37,7 +37,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendDirectNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, message: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from an NPC (e.g. prapor) to the player with or without items * @param sessionId The session ID to send the message to @@ -47,7 +47,7 @@ export declare class MailSendService { * @param items Optional items to send to player * @param maxStorageTimeSeconds Optional time to collect items before they expire */ - sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: MessageContentRagfair): void; + sendLocalisedNpcMessageToPlayer(sessionId: string, trader: Traders, messageType: MessageType, messageLocaleId: string, items?: IItem[], maxStorageTimeSeconds?: number, systemData?: ISystemData, ragfair?: IMessageContentRagfair): void; /** * Send a message from SYSTEM to the player with or without items * @param sessionId The session ID to send the message to @@ -92,21 +92,21 @@ export declare class MailSendService { * @param messageDetails Various details on what the message must contain/do * @returns Message */ - protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): Message; + protected createDialogMessage(dialogId: string, messageDetails: ISendMessageDetails): IMessage; /** * Add items to message and adjust various properties to reflect the items being added * @param message Message to add items to * @param itemsToSendToPlayer Items to add to message * @param maxStorageTimeSeconds total time items are stored in mail before being deleted */ - protected addRewardItemsToMessage(message: Message, itemsToSendToPlayer: MessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; + protected addRewardItemsToMessage(message: IMessage, itemsToSendToPlayer: IMessageItems | undefined, maxStorageTimeSeconds: number | undefined): void; /** * perform various sanitising actions on the items before they're considered ready for insertion into message * @param dialogType The type of the dialog that will hold the reward items being processed * @param messageDetails * @returns Sanitised items */ - protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): MessageItems; + protected processItemsBeforeAddingToMail(dialogType: MessageType, messageDetails: ISendMessageDetails): IMessageItems; /** * Try to find the most correct item to be the 'primary' item in a reward mail * @param items Possible items to choose from @@ -119,7 +119,7 @@ export declare class MailSendService { * @param messageDetails Data on what message should do * @returns Relevant Dialogue */ - protected getDialog(messageDetails: ISendMessageDetails): Dialogue; + protected getDialog(messageDetails: ISendMessageDetails): IDialogue; /** * Get the appropriate sender id by the sender enum type * @param messageDetails diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 458828f..43d1d11 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -7,7 +7,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBonus, IHideoutSlot } from "@spt/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; -import { StageBonus } from "@spt/models/eft/hideout/IHideoutArea"; +import { IStageBonus } from "@spt/models/eft/hideout/IHideoutArea"; import { IEquipmentBuild, IMagazineBuild, ISptProfile, IWeaponBuild } from "@spt/models/eft/profile/ISptProfile"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; @@ -119,5 +119,5 @@ export declare class ProfileFixerService { * @param bonus bonus to find * @returns matching bonus */ - protected getBonusFromProfile(profileBonuses: IBonus[], bonus: StageBonus): IBonus | undefined; + protected getBonusFromProfile(profileBonuses: IBonus[], bonus: IStageBonus): IBonus | undefined; } diff --git a/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts deleted file mode 100644 index 4492dda..0000000 --- a/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; -import { ICloner } from "@spt/utils/cloners/ICloner"; -export declare class ProfileSnapshotService { - protected cloner: ICloner; - protected storedProfileSnapshots: Record; - constructor(cloner: ICloner); - /** - * Store a profile into an in-memory object - * @param sessionID session id - acts as the key - * @param profile - profile to save - */ - storeProfileSnapshot(sessionID: string, profile: ISptProfile): void; - /** - * Retreve a stored profile - * @param sessionID key - * @returns A player profile object - */ - getProfileSnapshot(sessionID: string): ISptProfile | undefined; - /** - * Does a profile exists against the provided key - * @param sessionID key - * @returns true if exists - */ - hasProfileSnapshot(sessionID: string): boolean; - /** - * Remove a stored profile by key - * @param sessionID key - */ - clearProfileSnapshot(sessionID: string): void; -} diff --git a/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts b/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts index 0d03459..c9509d0 100644 --- a/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RagfairLinkedItemService.d.ts @@ -1,11 +1,13 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; export declare class RagfairLinkedItemService { protected databaseService: DatabaseService; protected itemHelper: ItemHelper; + protected logger: ILogger; protected linkedItemsCache: Record>; - constructor(databaseService: DatabaseService, itemHelper: ItemHelper); + constructor(databaseService: DatabaseService, itemHelper: ItemHelper, logger: ILogger); getLinkedItems(linkedSearchId: string): Set; /** * Use ragfair linked item service to get an array of items that can fit on or in designated itemtpl diff --git a/TypeScript/9RouterHooks/types/services/RaidWeatherService.d.ts b/TypeScript/9RouterHooks/types/services/RaidWeatherService.d.ts new file mode 100644 index 0000000..fd82da2 --- /dev/null +++ b/TypeScript/9RouterHooks/types/services/RaidWeatherService.d.ts @@ -0,0 +1,43 @@ +import { WeatherGenerator } from "@spt/generators/WeatherGenerator"; +import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; +import { IWeather } from "@spt/models/eft/weather/IWeatherData"; +import { Season } from "@spt/models/enums/Season"; +import { IWeatherConfig } from "@spt/models/spt/config/IWeatherConfig"; +import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; +import { DatabaseService } from "@spt/services/DatabaseService"; +import { SeasonalEventService } from "@spt/services/SeasonalEventService"; +import { TimeUtil } from "@spt/utils/TimeUtil"; +export declare class RaidWeatherService { + protected logger: ILogger; + protected databaseService: DatabaseService; + protected timeUtil: TimeUtil; + protected weatherGenerator: WeatherGenerator; + protected seasonalEventService: SeasonalEventService; + protected weightedRandomHelper: WeightedRandomHelper; + protected configServer: ConfigServer; + protected weatherConfig: IWeatherConfig; + protected weatherForecast: IWeather[]; + constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, weatherGenerator: WeatherGenerator, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer); + /** + * Generate 24 hours of weather data starting from midnight today + */ + generateWeather(currentSeason: Season): void; + /** + * Get a time period to increment by, e.g 15 or 30 minutes as milliseconds + * @returns milliseconds + */ + protected getWeightedWeatherTimePeriodMs(): number; + /** + * Find the first matching weather object that applies to the current time + */ + getCurrentWeather(): IWeather; + /** + * Find the first matching weather object that applies to the current time + all following weather data generated + */ + getUpcomingWeather(): IWeather[]; + /** + * Ensure future weather data exists + */ + protected validateWeatherDataExists(currentSeason: Season): void; +} diff --git a/TypeScript/9RouterHooks/types/services/RepairService.d.ts b/TypeScript/9RouterHooks/types/services/RepairService.d.ts index ec6144e..c4772cf 100644 --- a/TypeScript/9RouterHooks/types/services/RepairService.d.ts +++ b/TypeScript/9RouterHooks/types/services/RepairService.d.ts @@ -7,11 +7,11 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { RepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; -import { RepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; +import { IRepairKitsInfo } from "@spt/models/eft/repair/IRepairActionDataRequest"; +import { IRepairItem } from "@spt/models/eft/repair/ITraderRepairActionDataRequest"; import { BonusType } from "@spt/models/enums/BonusType"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; -import { BonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; +import { IBonusSettings, IRepairConfig } from "@spt/models/spt/config/IRepairConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -40,7 +40,7 @@ export declare class RepairService { * @param traderId Trader being used to repair item * @returns RepairDetails object */ - repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: RepairItem, traderId: string): RepairDetails; + repairItemByTrader(sessionID: string, pmcData: IPmcData, repairItemDetails: IRepairItem, traderId: string): RepairDetails; /** * @param sessionID Session id * @param pmcData profile to take money from @@ -72,7 +72,7 @@ export declare class RepairService { * @param output IItemEventRouterResponse * @returns Details of repair, item/price */ - repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: RepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; + repairItemByKit(sessionId: string, pmcData: IPmcData, repairKits: IRepairKitsInfo[], itemToRepairId: string, output: IItemEventRouterResponse): RepairDetails; /** * Calculate value repairkit points need to be divided by to get the durability points to be added to an item * @param itemToRepairDetails Item to repair details @@ -112,7 +112,7 @@ export declare class RepairService { * @param itemConfig weapon/armor config * @param repairDetails Details for item to repair */ - addBuff(itemConfig: BonusSettings, item: IItem): void; + addBuff(itemConfig: IBonusSettings, item: IItem): void; /** * Check if item should be buffed by checking the item type and relevant player skill level * @param repairDetails Item that was repaired diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index ca4a33c..281bf99 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -117,8 +117,18 @@ export declare class SeasonalEventService { * @param eventName Name of the event to enable. e.g. Christmas */ protected updateGlobalEvents(sessionId: string, globalConfig: IConfig, eventType: SeasonalEventType): void; + /** + * Force zryachiy to always have a melee weapon + */ protected adjustZryachiyMeleeChance(): void; + /** + * Enable the halloween zryachiy summon event + */ protected enableHalloweenSummonEvent(): void; + /** + * Add event bosses to maps + * @param eventType Seasonal event, e.g. HALLOWEEN/CHRISTMAS + */ protected addEventBossesToMaps(eventType: SeasonalEventType): void; /** * Change trader icons to be more event themed (Halloween only so far) @@ -134,6 +144,9 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Add pumpkin loot boxes to scavs + */ protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it @@ -155,5 +168,8 @@ export declare class SeasonalEventService { * @returns Bot role as string */ getBaseRoleForEventBot(eventBotRole: string): string; + /** + * Force the weather to be snow + */ enableSnow(): void; } diff --git a/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts b/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts index 6bef9f5..ba85a67 100644 --- a/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts +++ b/TypeScript/9RouterHooks/types/services/TraderPurchasePersisterService.d.ts @@ -1,5 +1,5 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper"; -import { TraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; +import { ITraderPurchaseData } from "@spt/models/eft/profile/ISptProfile"; import { ITraderConfig } from "@spt/models/spt/config/ITraderConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; @@ -24,7 +24,7 @@ export declare class TraderPurchasePersisterService { * @param traderId Trader to loop up purchases for * @returns Dict of assort id and count purchased */ - getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; + getProfileTraderPurchases(sessionId: string, traderId: string): Record | undefined; /** * Get a purchase made from a trader for requested profile before the last trader reset * @param sessionId Session id @@ -32,7 +32,7 @@ export declare class TraderPurchasePersisterService { * @param assortId Id of assort to get data for * @returns TraderPurchaseData */ - getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): TraderPurchaseData | undefined; + getProfileTraderPurchase(sessionId: string, traderId: string, assortId: string): ITraderPurchaseData | undefined; /** * Remove all trader purchase records from all profiles that exist * @param traderId Traders id diff --git a/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts b/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts index f112872..bbc0453 100644 --- a/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts @@ -1,5 +1,5 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; -import { ITemplateItem, Props } from "@spt/models/eft/common/tables/ITemplateItem"; +import { IProps, ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { CreateItemResult, LocaleDetails, NewItemDetails, NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { DatabaseService } from "@spt/services/DatabaseService"; @@ -47,7 +47,7 @@ export declare class CustomItemService { * @param overrideProperties new properties to apply * @param itemClone item to update */ - protected updateBaseItemPropertiesWithOverrides(overrideProperties: Props, itemClone: ITemplateItem): void; + protected updateBaseItemPropertiesWithOverrides(overrideProperties: IProps, itemClone: ITemplateItem): void; /** * Addd a new item object to the in-memory representation of items.json * @param newItemId id of the item to add to items.json diff --git a/TypeScript/9RouterHooks/types/utils/TimeUtil.d.ts b/TypeScript/9RouterHooks/types/utils/TimeUtil.d.ts index 6c14b9d..48d769b 100644 --- a/TypeScript/9RouterHooks/types/utils/TimeUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/TimeUtil.d.ts @@ -42,11 +42,17 @@ export declare class TimeUtil { * @returns {number} The current timestamp in seconds since the Unix epoch in UTC. */ getTimestamp(): number; + getStartOfDayTimestamp(timestamp?: number): number; /** * Get timestamp of today + passed in day count * @param daysFromNow Days from now */ getTimeStampFromNowDays(daysFromNow: number): number; + /** + * Get timestamp of today + passed in hour count + * @param daysFromNow Days from now + */ + getTimeStampFromNowHours(hoursFromNow: number): number; /** * Gets the current time in UTC in a format suitable for mail in EFT. * @@ -67,4 +73,10 @@ export declare class TimeUtil { */ getHoursAsSeconds(hours: number): number; getTimestampOfNextHour(): number; + /** + * Returns the current days timestamp at 00:00 + * e.g. current time: 13th march 14:22 will return 13th march 00:00 + * @returns Timestamp + */ + getTodaysMidnightTimestamp(): number; } diff --git a/TypeScript/9RouterHooks/types/utils/logging/AbstractWinstonLogger.d.ts b/TypeScript/9RouterHooks/types/utils/logging/AbstractWinstonLogger.d.ts index b850284..fb84b83 100644 --- a/TypeScript/9RouterHooks/types/utils/logging/AbstractWinstonLogger.d.ts +++ b/TypeScript/9RouterHooks/types/utils/logging/AbstractWinstonLogger.d.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; +import { IDaum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt/models/spt/logging/LogTextColor"; import { SptLogger } from "@spt/models/spt/logging/SptLogger"; @@ -50,7 +50,7 @@ export declare abstract class AbstractWinstonLogger implements ILogger { protected getLogFrequency(): string; protected getLogMaxSize(): string; protected getLogMaxFiles(): string; - writeToLogFile(data: string | Daum): Promise; + writeToLogFile(data: string | IDaum): Promise; log(data: string | Error | Record, color: string, backgroundColor?: string): Promise; error(data: string | Record): Promise; warning(data: string | Record): Promise;